如何使用FindControl查找内容页上的某个控件?

如果单纯的使用:this.FindControl("ctrl"); 累死了也找不到,

因为 单纯的控件树上 没有注册到这个控件;应该是 下面这个方法:

this.Master.FindControl("cphContent").FindControl("ctrl");

这样,控件位于母版页上内容占位这个控件树上。

原文地址:https://www.cnblogs.com/xlong1900/p/1766186.html