在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
用C#动态生成HTML的问题 1. don't use response.write, since the output normally goes to the top of the file, use Literal, for example:
protected Literal lit; void Page_Load(Object sender, EventArgs e) 2. use server controls <form runat="server" > <asp:Button /> <script language="C#" runat="server"> TextBox t = new TextBox(); HtmlInputText hit = new HtmlInputText(); form1.Controls.Add(hit); void GetValue(Object sender, EventArgs e) </script> if you insist on using Response.Write("<input name='xxx'>"), then you have to use Request.Form["xxx"] to retrieve the value |
请发表评论