aspxtreme

LoginName Control Syntax

ASP.NET Syntax   ASP.NET Syntax for Web Controls


Displays the authenticated user's name on a Web page.

Declarative Syntax

For information on the individual members of this class, see LoginName in the class library.

Remarks

By default, the LoginName control displays the name that is contained in the User property. If the Name property of the IIdentity interface is empty, nothing is displayed. The User property of the Page class returns an IPrincipal object that exposes an Identity property, which returns an IIdentity object.

Syntax Example

The following example shows how to use the LoginName class on a page.

<asp:loginname id="LoginName1" runat="server" 
   formatstring = "Welcome, {0}" />
See Also

LoginName Class   LoginName Web Server Control



Books and more ...


Suggested Reading

Need a break ?



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme