FormsAuthenticationUserCollection.Get Method (String)

 

Gets the FormsAuthenticationUser collection element with the specified name.

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

public FormsAuthenticationUser Get(
	string name
)

Parameters

name
Type: System.String

The user's name.

Return Value

Type: System.Web.Configuration.FormsAuthenticationUser

A FormsAuthenticationUser object that contains the user name and password.

The following code example shows how to access credentials of a user with the specified name.

// Get the user with the specified name.
FormsAuthenticationUser storedUser = 
    formsAuthenticationCredentials.Users.Get("userName");

.NET Framework
Available since 2.0
Return to top
Show: