GetAllUsers Method
Collapse the table of content
Expand the table of content

Membership.GetAllUsers Method ()


Gets a collection of all the users in the database.

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

public static MembershipUserCollection GetAllUsers()

Return Value

Type: System.Web.Security.MembershipUserCollection

A MembershipUserCollection of MembershipUser objects representing all of the users in the database.

GetAllUsers returns the information for all membership users for an application as a collection of MembershipUser objects. Be careful when using the GetAllUsers method with very large user databases, as the resulting MembershipUserCollection in your ASP.NET page may degrade the performance of your application.

The following code example returns a list of users with a count of the number of users currently online.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft