Search
Author
ASP.NET Tutorials
Author
Sheo Narayan
Advertisements


Winners

Win Prizes

Social Presence
Like us on Facebook

Silverlight Tutorials | Report a Bug in the Tutorial
asp:LoginStatus control
LoginStatus control is a very simple and compact control that displays either Login (if user is not nog logged in) or Logout (if user is logged in).
 
LoginStatus control is a very simple and compact control that displays either Login (if user is not nog logged in) or Logout (if user is logged in). When Login link is clicked, it automatredirects Internally, When it is rendered on the page, it is implemented through <table></table> HTML tag.

Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc. are implemented through style properites of <table, tr, td/> tag.

DEMO : LoginView Show Source Code
Welcome, Guest Login For working example, Please visit or Download.
                    
// LoginView Control ////////////////////////////          
<asp:LoginView ID="LoginView1" runat="Server">
    <AnonymousTemplate>
        <span style="font-family: Arial; font-size: 10pt;">Welcome, Guest
            <asp:LoginStatus ID="LoginStatus1" runat="Server" />
        </span>
    </AnonymousTemplate>
    <LoggedInTemplate>
        Welcome,
        <asp:LoginName ID="LoginName1" runat="Server" />
        <asp:LoginStatus ID="LoginStatus1" runat="Server" />
    </LoggedInTemplate>