Hello,
I want to hide a panel in the codebehind of my content page, but the panel itself is located in my masterpage.
This is how I tried to do it, but it doesn't work:
In the masterpage:
<asp:panel runat="server" id="MyPanel">content to hide</asp:panel>
In the content page:
<%
@ MasterType virtualpath="~/mymasterpage.master" %>
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim MyPanel As Panel
MyPanel = Page.Master.FindControl("MyPanel")
MyPanel.Visible = True
End Sub
How can I hide the panel?
Best Regards!