Easy Tutorial
❮ Prop Webcontrol Image Imagealign Prop Webcontrol Calendar Firstdayofweek ❯

WebSecurity - GetUserId()



Definition

The GetUserId() method returns the ID of the specified user.


C# and VB Syntax


Parameters

Parameter Type Description
userName String The username

Return Value

Type Description
Integer User ID

Errors and Exceptions

In the following cases, any access to the WebSecurity object will throw an InvalidOperationException:


Remarks

The user ID is the primary key of the user information stored in the user database.

It is used to identify the user in the user profile table and membership table.


Technical Data

Name Value
Namespace WebMatrix.WebData
Assembly WebMatrix.WebData.dll

❮ Prop Webcontrol Image Imagealign Prop Webcontrol Calendar Firstdayofweek ❯