Click here to Skip to main content
15,891,788 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I want to create a asp.net MVC website. And my requirement is as follow:

I have more than 20 roles of users like (manager,admin,superadmin etc).

Every role has access to some screens and screen controls(textbox,ddl etc).

It may be on a screen some controls are not given to role.


how i can achieve this functionality...

Note: everything is coming from database i.e control id, screenid for role

Please give me idea how i can do this in Asp.net MVC website... I already done it in asp.net webforms.



thanks in advance
Posted

1 solution

You will have to write your own HtmlHelpers for controls that you want to render differently or not at all based on security permissions.

Hope that helps.

Thanks
 
Share this answer
 
Comments
dhiman.rohit9 4-Feb-15 5:18am    
surely it will help.

can you explain a little bit more??

Like, do i need to do something on base controllers for these custom html helpers?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900