title: ASP.Net Master Page Sidebar display after Login (keeping it displayed whilst logged in)
body: <p>I have the following sidebar on my master page. It is not a part of any ContentPlaceHolder.</p>
  
  <pre><code>&lt;div runat="server" visible="false" id="menuAccountMembersDiv" class="leftCol"&gt;
      &lt;asp:Menu ID="menuAccountMembers" runat="server" StaticSubMenuIndent="16px" Visible="false"&gt;
      &lt;Items&gt;
          &lt;asp:MenuItem ImageUrl="~/Resources/x.png" 
          NavigateUrl="~/About.aspx" Text="x" ToolTip="x" 
          Value="b647ce4e-5c7f-400c-a921-ec7902494f26"&gt;&lt;/asp:MenuItem&gt;
          &lt;asp:MenuItem ImageUrl="~/Resources/y.png" 
          NavigateUrl="~/About.aspx" Text="y" ToolTip="y" 
          Value="y"&gt;&lt;/asp:MenuItem&gt;
          &lt;asp:MenuItem ImageUrl="~/Resources/sarahhunkin.png" NavigateUrl="~/About.aspx" 
          PopOutImageUrl="~/Resources/z.png" Text="z" 
          ToolTip="z" Value="z"&gt;&lt;/asp:MenuItem&gt;
          &lt;asp:MenuItem ImageUrl="~/Resources/a.png" 
          NavigateUrl="~/About.aspx" 
          PopOutImageUrl="~/Resources/apop.png" Text="a" 
          ToolTip="a" Value="a"&gt;&lt;/asp:MenuItem&gt;
      &lt;/Items&gt;
      &lt;/asp:Menu&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I initially hide it. But I would like to display it and keep it displayed after logging in. Using the standard web application login page. I tried the following:</p>
  
  <pre><code>protected void LoginUser_LoggedIn(object sender, EventArgs e)
  {
      Menu MenuAccountMembers = (Menu)Master.FindControl("menuAccountMembers");
  
      MenuAccountMembers.Visible = true;
  
      Control menuAccountMembersDiv = (Control)Master.FindControl("menuAccountMembersDiv");
  
      menuAccountMembersDiv.Visible = true;
  }
  </code></pre>
  
  <p>I am not sure to to interact with the div tag, as there is no Div object. In any event, this does not display the sidebar with the menu</p>
  
  <p><strong>EDIT</strong>:
  I ended up adding the following code to the master page itself.</p>
  
  <pre><code>public partial class SiteMaster : System.Web.UI.MasterPage
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          if (HttpContext.Current.Request.IsAuthenticated)
          {
              Control MenuDiv = this.FindControl("menuAccountMembersDiv");
              MenuDiv.Visible = true;
  
              Menu AccountMenu = (Menu)MenuDiv.FindControl("menuAccountMembers");
              AccountMenu.Visible = true;
          }
      }
  }
  </code></pre>