Reputation: 15
thnx for the help in advance....I hav an mvc project of sign in page in which i have 2 tabs in shared layout page ,one is add user and another is log off tab...now i dont want to show these 2 tabs imidialty when somone open this project. i want to remove these tabs from master view..so that only after a sucesful login that user can see the add user and log of tabs ..what to do to shift these tabs and where to shift these tabs. the tabs are
<li>@Html.ActionLink("UserManagement", "Index", "User")</li>
<li>@Html.ActionLink("LogOff", "Index", "Home")</li>
Upvotes: 0
Views: 74
Reputation: 912
You can do something like:
@if(User.Identity.IsAuthenticated) {
<li>@Html.ActionLink("UserManagement", "Index", "User")</li>
<li>@Html.ActionLink("LogOff", "Index", "Home")</li>
}
Upvotes: 2