Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Any one help me out, how to work with LoginStatus control in asp.net...

the statu before login should be 'userlogin' after logged in ,it automatically changes to 'userlogout'

any suggestions??

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
219 views
Welcome To Ask or Share your Answers For Others

1 Answer

How about this

<asp:LoginView ID="ctlRightNavbar" runat="server">
   <AnonymousTemplate>
       <a href="/login.aspx" class="navbar">userlogin</a>
   </AnonymousTemplate>
   <LoggedInTemplate>
      <a href="/logout.aspx" class="navbar">userlogout</a>
   </LoggedInTemplate>
</asp:LoginView>

This will make a more custom view for you if you do not wish to use LoginStatus. You can read more about the above code sample here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...