Share via


WebSecurity.CurrentUserId Property

Gets the ID for the current user.

Namespace:  WebMatrix.WebData
Assembly:  WebMatrix.WebData (in WebMatrix.WebData.dll)

Syntax

'Declaration
Public Shared ReadOnly Property CurrentUserId As Integer 
    Get
'Usage
Dim value As Integer 

value = WebSecurity.CurrentUserId
public static int CurrentUserId { get; }
public:
static property int CurrentUserId {
    int get ();
}
static member CurrentUserId : int
static function get CurrentUserId () : int

Property Value

Type: System.Int32
The ID for the current user.

Remarks

The ID represents the key under which the user information is stored in the provider data store. The same ID is used to identify a user both in the user profile table and in the membership table.

See Also

Reference

WebSecurity Class

WebMatrix.WebData Namespace