如:
(Button)this.QueryControl.FindControl("queryButton"); 不直接具有button的属性。
解决:实例化一个新的对象。
Button btn = new Button();
btn = (Button)this.QueryControl.FindControl("queryButton");
btn.Attributes.。。。
本文探讨了在ASP.NET中通过FindControl方法获取的Button控件无法直接使用其属性的问题,并提供了解决方案——通过实例化新的Button对象来访问和修改其Attributes。
如:
(Button)this.QueryControl.FindControl("queryButton"); 不直接具有button的属性。
解决:实例化一个新的对象。
Button btn = new Button();
btn = (Button)this.QueryControl.FindControl("queryButton");
btn.Attributes.。。。
1209

被折叠的 条评论
为什么被折叠?
