aspx后台页面怎么修改前台控件的属性值
答案:2 悬赏:40 手机版
解决时间 2021-03-10 12:18
- 提问者网友:孤山下
- 2021-03-09 20:02
aspx后台页面怎么修改前台控件的属性值
最佳答案
- 五星知识达人网友:患得患失的劫
- 2021-03-09 21:40
首先需要增加 runat="server"。
然后,可以在 asp.net 代码中写
C# code?
1
2
3
this.Text1.Attributes["readonly"] = "readonly";
this.Text1.Attributes.Remove("readonly");
然后,可以在 asp.net 代码中写
C# code?
1
2
3
this.Text1.Attributes["readonly"] = "readonly";
this.Text1.Attributes.Remove("readonly");
全部回答
- 1楼网友:山有枢
- 2021-03-09 23:05
首先需要增加 runat="server"。
然后,可以在 asp.net 代码中写
this.text1.attributes["readonly"] = "readonly";
this.text1.attributes.remove("readonly");
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯