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

I develop one web database application the back end sql server 2008 and vb code but I need to create access level for any user when the user fill registration form after login in to the page I want to restricts some page to insert ,Edit ,Delete and Update data is there any one can help in this area

Thanks a lot
Posted
Updated 4-Jan-13 17:20pm
v2
Comments
Christian Graus 4-Jan-13 18:11pm    
IT's sure annoying when it's obvious someone has posted the same question to 20 web sites, because it gets put in a code block when you paste it here.

What you talk of is called authorization.

Go through these links to understand all about User roles in ASP.NET and Authorization:
MSDN: How To: Use Role Manager in ASP.NET 2.0[^]
MSDN: ASP.NET Authorization[^]
MSDN: Understanding Role Management[^]
Membership and Role Providers in ASP.NET 2.0 Part I[^]
Membership and Role Providers in ASP.NET 2.0 Part II [^]

Once ASP.NET roles and membership is in place, you always have an access to type of role/membership of the logged in user (in all the pages). Based on the roles, you can play with the visibility of the controls at runtime. Thus, show the ones specific to a role.
 
Share this answer
 
v2
This is called a permissions system. The way I'd do this, is a base class on all pages that gives you methods to check permissions, then on each page constructor, or perhaps load event, you check the current logged in users permissions against an enum, and redirect if they don't have permission
 
Share this answer
 

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