Take the 2-minute tour ×  H had created a master page with a
menu div. I made index page as a login page, so I use the login
control in index.aspx which is registered under the master page.
Now my question is how can I hide the menu div which is in
master page until the user does login, after the user doing
successful login the menu div should appear to the user
share|improve this question  3 Answers 3  In your master page,
you can do something like this:  if (Request.IsAuthenticated)
<p>Welcome back, @User.Identity.Name!</p>     <!-- Put login
form here. --> share|improve this answer up vote 1 down vote
accepted  I put this code in my MasterPage                 <% if
(HttpContext.Current.User.Identity.IsAuthenticated ) { %>
<div>navigation html when is authenticated</div>
<% } else { %>                <div>navigation html when is NOT
authenticated</div>                  <% } %> share|improve this
answer  Add a @ MasterType directive in the content page. In the
directi