0

Web site Administration Tool is accessible only from the hosting server. Many times programmers won't have direct access to the the hosting server. So knowledge of ASP.Net Membership classes is an added advantage in creating an administrative module for the site.
In this code snippet we will take up:
1. Listing all roles
2. Creating a role
3. Listing all users
4. Deleting a user
5. Listing Number of users online

1. 
lstRoles.DataSource = Roles.GetAllRoles(); 
DataBind(); 

2. 
Roles.CreateRole("Admin"); 

3.
lstUsers.DataSource = Membership.GetAllUsers(); 
DataBind(); 

4. Membership.DeleteUser("Anish");

5.
Mebership.GetNumberOfUsersOnline();
1
Contributor
0
Replies
1
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.