textbox只读:.NET 2.0 中TextBox只读时在客户端赋值后的取值问题来源: 发布时间:星期四, 2009年2月12日 浏览:205次 评论:0
在.NET 2.0 下 ![]() ![]() ![]() ![]() ![]() ![]() ![]() 1、不设置ReadOnly属性 ![]() ![]() ![]() <asp:TextBox ID="TextBox1" runat="server" _disibledevent=>在此情况下 ![]() ![]() ![]() ![]() ![]() ![]() 2、设置了ReadOnly属性后 ![]() ![]() 前台代码: <asp:TextBox ID="TextBox1" runat="server" ReadOnly="True" ></asp:TextBox> 后台代码: ![]() ![]() 3、在Page_Load ![]() ![]() ![]() ![]() protected void Page_Load(object sender, EventArgs e) ...{ ![]() ...{ TextBox1.Attributes.Add("readonly","true"); } } 0
相关文章读者评论发表评论 |