|
|
1
2
因为按钮在模板中,所以需要使用FindControl方法。
然后,在代码隐藏中,您需要像这样引用它:
|
|
|
2
0
另请参见 this topic this . 所以你确定你在当前的活动模板中搜索吗? |
|
|
3
0
只是为了将来的参考,(我没有试过内特的代码)有时你必须搜索在中找到的控件
http://converter.telerik.com/ 对于C#到VB.NET
|
|
|
4
0
你登录过你的网站吗?如果您没有登录,您的按钮将不会显示在您的页面上(所以您将无法使用FindControl找到它。)
Dim btn As Button=Ctype(loginview1.FindControl(“btn1”),按钮)
loginview1$btn1 System.Web.UI.WebControls.Button |