LoginName control is used to display current logged in user name. If the user is not logged in, this page doesn't render any thing.
This control gets the value by using Page.Identity.Name.
Its properties like BackColor, ForeColor, BorderColor, BorderStyle, BorderWidth, Height etc.
are implemented through style properites of <span/> tag.
DEMO : LoginView
|
Show Source Code
|
Login to see LoginName control demo
|
For working example, Please visit or Download.
|
// LoginName Control ////////////////////////////
<asp:LoginName ID="LoginName1" runat="server" FormatString="LoginName Demo: Welcome, {0}" ForeColor="Blue" BorderColor="ActiveBorder" BorderStyle="Double" />
|