access to page ?

  • Thread starter Thread starter Jarod
  • Start date Start date
J

Jarod

Hey
I want to setup diffrent access permision to each page maybe even for some
elements on the page. What's the easiest way to do it ? I plan do develop
something like HasModuleAccess(string pageName,string moduleName) function
and depending on this check... Maybe already there is something like this ?
I could use roles but what's the way to check the role without hardcoding
it's name ? So for example I have my page only for AdminUsers:
Roles.IsInRole("AdminUsers") - > ok works perfect.. but what if the user
changes name of the role or want's to add a new roles... What's best
solution in this case ?
Jarod
 
Hi Jarod,

..Net Framework has already have a lot of stuff for managing page-level
security. In asp.net 2.0 you have Web Parts, where you can have a more
modular approach that might be the thing you where looking for:

See: http://www.asp.net/QuickStart/aspnet/doc/webparts/default.aspx

And for general asp.net 2.0 security stuff :
http://www.asp.net/QuickStart/aspnet/doc/security/default.aspx


--
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com

"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top