FormsAuthenticationUserCollection.Item Property (String)

 

Gets the FormsAuthenticationUser with the specified name.

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

public FormsAuthenticationUser this[
	string name
] { get; }

Parameters

name
Type: System.String

The user's name.

Property Value

Type: System.Web.Configuration.FormsAuthenticationUser

A FormsAuthenticationUser object that contains the user name and password.

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

// Get the user element with the specified name.
FormsAuthenticationUser storedUser4 = 
    formsAuthenticationCredentials.Users["userName"];

.NET Framework
Available since 2.0
Return to top
Show: