Access UserControl Label id into master page in

Last Reply on Jan 26, 2016 04:26 AM By Shashikant

Posted on Jan 26, 2016 04:26 AM

How to use web user control label id into masterpage? as its not working 

Posted on Jan 26, 2016 04:26 AM


You can use two methods. The first is by using Page.Master.FindControl('controlID'). Then you can cast it to the type of your user control. The second method is by adding a <%@ MasterType VirtualPath="" TypeName=""%> tag to your aspx page. In the VirtualPath add the virtual path to the master page, and the class in the TypeName. You can then access everything with intellisense.