aspx:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
aspx.cs:
protected void Page_Load(object sender, EventArgs e)
{
TextBox1.Style.Add("display", "none");
}
{
TextBox1.Style.Add("display", "none");
}
浏览之后,查看源文件:
<input name="TextBox1" type="text" id="TextBox1" style="display:none;" />