Sagar
Sagar

Reputation: 29

Tools for form authentication in web application on the basis of user role in asp.net

I need to implement one website and in this website i want to give access to users on the basis of there roles. I used Roles and Membership, but i found its based on folder. I want form based authentication. Is there any tool for this.

Upvotes: 0

Views: 55

Answers (1)

Brandon Spilove
Brandon Spilove

Reputation: 1569

In your code you can check a user's role membership, something like this:

if (User.IsInRole("admins")) {
    //display the admin menu
} else {
    //display the non-admin menu
}

Upvotes: 1

Related Questions