开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜