I m working on a MVC 3 application , it contain different links , i want to show the links according to the roles or rights. If Link A is to Admin thn Link A shouldnt be visble to Members right users.
How to achieve this thing in MVC ?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if you’re not using the asp membership, you could do it this way, supposing you could get the role by using the username and that the role is included in the model:
crude sample but if that what you’re looking for.