开发者

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
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜