Click here to Skip to main content
12,948,130 members (77,129 online)
Rate this:
Please Sign up or sign in to vote.
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 4-Jan-13 12:08pm
Updated 4-Jan-13 17:20pm
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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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

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

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,344
CHill60 3,275
Maciej Los 2,703
Jochen Arndt 1,935
ppolymorphe 1,795

Advertise | Privacy | Mobile
Web01 | 2.8.170524.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100