Can I use <asp:textbox> in innerHTML?
I have dropdownlist and I have added javascript to show the contents(e.g.开发者_运维知识库 person 1, person 2 etc). I used below the code but textbox wasn't displayed.
innerHtml = innerHtml + <asp:TextBox runat=server ID=txtName3 MaxLength=100 Text=''></asp:TextBox>
No, you cannot, as ASP.NET controls are executed on the server, not on the client.
You can add HTML input
tag instead.
What you probably want to do is to use UpdatePanel
to refresh part of your page after changing selection in dropdown.
精彩评论