Expose the visible property of the user control via a property of the MasterPage
.
In your MasterPage
:
public bool MyBannerVisibility
{
get { return uc_banner1.Visible; }
set { uc_banner1.Visible = value; }
}
Then make sure to add a reference in your content page:
<%@ MasterType TypeName="YourMasterPageTypeName" %>
Then in your content page just do:
Master.MyBannerVisibility = false;
Edit: Since your using VB.net I used a code converter to convert it for you:
Public Property MyBannerVisibility() As String
Get
Return uc_banner1.Visible
End Get
Set
uc_banner1.Visible = value
End Set
End Property
Content Page:
Master.MyBannerVisibility = False