Freigeben über


FindUsersByName Method

Gets a collection of membership users where the user name match the search criteria. The total number of users matching the query are available.

Namespace:  Microsoft.CommerceServer.Runtime.Profiles
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public Overrides Function FindUsersByName ( _
    usernameToMatch As String, _
    pageIndex As Integer, _
    pageSize As Integer, _
    <OutAttribute> ByRef totalRecords As Integer _
) As MembershipUserCollection
'Usage
Dim instance As UpmMembershipProvider
Dim usernameToMatch As String
Dim pageIndex As Integer
Dim pageSize As Integer
Dim totalRecords As Integer
Dim returnValue As MembershipUserCollection

returnValue = instance.FindUsersByName(usernameToMatch, _
    pageIndex, pageSize, totalRecords)
public override MembershipUserCollection FindUsersByName(
    string usernameToMatch,
    int pageIndex,
    int pageSize,
    out int totalRecords
)
public:
virtual MembershipUserCollection^ FindUsersByName(
    String^ usernameToMatch, 
    int pageIndex, 
    int pageSize, 
    [OutAttribute] int% totalRecords
) override
public override function FindUsersByName(
    usernameToMatch : String, 
    pageIndex : int, 
    pageSize : int, 
    totalRecords : int
) : MembershipUserCollection

Parameters

  • pageIndex
    Type: System..::.Int32
    The index of the page of results to return. pageIndex is zero-based.
  • totalRecords
    Type: System..::.Int32%
    The total number of users matching the query.

Return Value

Type: System.Web.Security..::.MembershipUserCollection
Returns a collection of users whose name match search criteria.

Exceptions

Exception Condition
ArgumentNullException

usernameToMatch is nullNothingnullptra null reference (Nothing in Visual Basic) or an empty string.

Remarks

Returns a collection of users whose name match search criteria. A System.Web.Security.MembershipUserCollection that contains a page of pageSizeSystem.Web.Security.MembershipUser objects beginning at the page specified by pageIndex.

The totalRecords parameter is an out parameter that is set to the total number of matching membership users found in the membership data store.

Permissions

See Also

Reference

UpmMembershipProvider Class

UpmMembershipProvider Members

Microsoft.CommerceServer.Runtime.Profiles Namespace