Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft