发布时间:2017-09-21编辑:佚名阅读(1542)
1.在母版页中,如果需要找母版页中的控件:
this.FindControl("控件ID");
2.在母版页中,如果需要找ContentPage的控件,可以用:
this.FindControl("ContentPlaceHolderID").FindControl("控件ID");
3.在ContentPage中,如果需要找母版页中的控件,可以直接调用:
this.Master.FindControl("控件ID");
4.在ContentPage中找自己页面里的控件,必须先通过找到母版页中的ContentPlaceHolder,然后再找其中的控件:
this.Master.FindControl("ContentPlaceHolderID").FindControl("控件ID");
上一篇:asp.net读写cookie
下一篇:SQL语句去除所有HTML标签
0人
0人
1人
0人