ASP.NET Membership helps you manage user authentication for your websites. Its supports facilities to create user, assign roles, reset password and almost everything under the user management domain.
Its a common requirement to list down all the users using the ASP.NET Membership provider. Though ASP.NET Membership has a inbuilt
MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords); method where you can pass pageIndex, pageSize using which paging also can be handled.
However I found an another way to get this list, without having to play with the pageIndex and pageSize options on this StackOverflow thread.
var users = Membership.GetAllUsers();var userList = new List<MembershipUser>();
foreach (MembershipUser user in users)