2011-11-05 28 views
2

我試圖讓我的系統的所有用戶的列表,並使用下列內容:如何在ASP會員提供程序中使用GetAllUsers?

public MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords) 
    { 
     return _provider.GetAllUsers(pageIndex, pageSize, out totalRecords); 
    } 

但我不知道如何使用這些參數。我在網上瀏覽過,找不到任何示例。

有沒有人有他們有C#代碼來查詢和列出用戶的例子?

回答

2

此方法支持分頁。如果你的用戶基數很小或者你不關心分頁,你可以簡單地使用另一個不期望任何參數的overload

public static MembershipUserCollection GetAllUsers() 
相關問題