MembershipProvider.FindUsersByEmail(String, Int32, Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得成員資格使用者集合,其中電子郵件地址包含要符合的指定電子郵件地址。
public:
abstract System::Web::Security::MembershipUserCollection ^ FindUsersByEmail(System::String ^ emailToMatch, int pageIndex, int pageSize, [Runtime::InteropServices::Out] int % totalRecords);
public abstract System.Web.Security.MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords);
abstract member FindUsersByEmail : string * int * int * int -> System.Web.Security.MembershipUserCollection
Public MustOverride Function FindUsersByEmail (emailToMatch As String, pageIndex As Integer, pageSize As Integer, ByRef totalRecords As Integer) As MembershipUserCollection
參數
- emailToMatch
- String
要搜尋的電子郵件地址。
- pageIndex
- Int32
要傳回的結果頁面索引。 pageIndex
以零為起始。
- pageSize
- Int32
要傳回的結果網頁大小。
- totalRecords
- Int32
相符的使用者總數。
傳回
包含一頁 pageSize
MembershipUser 物件的 MembershipUserCollection 集合,從 pageIndex
指定的頁面開始。
範例
如需實作的 MembershipProvider 範例,請參閱 實作設定檔提供者。
備註
FindUsersByEmail會傳回成員資格使用者的清單,其中使用者的電子郵件地址符合所設定 ApplicationName 屬性所提供的 emailToMatch
。 如果您的資料來源支援其他搜尋功能,例如萬用字元,您可以為電子郵件地址提供更廣泛的搜尋功能。
傳 FindUsersByEmail 回的結果受限於 pageIndex
和 pageSize
參數。 參數 pageSize
會識別集合中 MembershipUserCollection 要傳回的物件 MembershipUser 數目。 參數 pageIndex
會識別要傳回 0 識別第一頁之結果的頁面。 參數 totalRecords
是參數 out
,設定為符合 emailToMatch
值的成員資格使用者總數。 例如,如果找到符合部分或整個電子郵件地址的 13 位使用者 emailToMatch
,且 pageIndex
值為 1 且 pageSize
值為 5,則 MembershipUserCollection 會包含第六位到第十位傳回的使用者。 totalRecords
會設定為 13。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應