Wednesday, 20 September 2017

Show menu item only for logged-on users

<% if(Context.User.Identity.IsAuthenticated) ...


<% if (Request.IsAuthenticated) { %>
  <li><%= Html.ActionLink("View my Listings", "MyListings", "List")%>
<% } %>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive