Page.User Property

 

Gets information about the user making the page request.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

[<BrowsableAttribute(false)>]
member User : IPrincipal with get

Property Value

Type: System.Security.Principal.IPrincipal

An IPrincipal that represents the user making the page request.

An IPrincipal object represents the security context of the user on whose behalf the code is running, including that user's identity and any roles to which they belong.

This property uses the HttpContext object's User property to determine where the request originates.

The following code example uses the User property to access authentication and identity information for the current user. If the user is not authenticated, it redirects them to a login page.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: