MVC 3 - Actionlink - Show/Hide Register if logged in/logged out
How do I: 1. Move the regi开发者_开发百科ster link "@Html.ActionLink("Register", "Register")" to the home page and 2. Show and Hide it based on if a user is logged in or logged out
I saw this tutorial awhile back but I can't find it again
-Jonny
1: Move the register link "@Html.ActionLink("Register", "Register")" to the home page
Ans: no tutorials link given so i cant answer this
2: Show and Hide it based on if a user is logged in or logged out
inside razaor view do this
@if (Request.IsAuthenticated)
{
//whatver
}
精彩评论