Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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
Edited 4-Jan-13 17:20pm
_Amy50.8K
v2
Comments
Christian Graus at 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
good
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.
  Permalink  
v2
Rate this: bad
good
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
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 530
1 mhegazy94 460
2 Ravi Bhavnani 230
3 Kornfeld Eliyahu Peter 185
4 Shemeemsha RA 160
0 Sergey Alexandrovich Kryukov 7,205
1 OriginalGriff 6,801
2 CPallini 5,350
3 George Jonsson 3,644
4 Gihan Liyanage 2,797


Advertise | Privacy | Mobile
Web03 | 2.8.140922.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2014
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