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