If I read it correctly, do you have a control on the main page and need to link to it from child pages in order to change its visibility? Or is something wrong with me?
In any case, this is how I usually do it in VB.Net, it should not be too difficult to port; -)
On the aspx page:
<%@ Reference Control="~/path/to/my/customControl.ascx" %>
In code:
Dim customControl As ASP.customcontrol_ascx = Master.FindControl("customControl") If customControl IsNot Nothing Then ... End If
source share