Recent Posts
Calendar
November 2013
S M T W T F S
« Oct    
 12
3456789
10111213141516
17181920212223
24252627282930

Posts Tagged ‘roles’

ASP.NET Assigning a Role to a User

C03H0045

Another function that is not supplied by one of the existing controls in ASP.NET is the ability to assign a user to a role.  For this, we will need to resort to using the APIs.

Since we can assign roles to users using the ASP.NET configuration tool, we can assume there is an API available that will do this work for us.

Here is how it is done.

Read the rest of this entry »

Determine The Role of a User in ASP.NET

winter-016

There are several controls that allow you to display content based on the role a user is in, including:

- LoginView
- LoginStatus

And the web.config file allows us to control which pages can be viewed based on which role a user is in.

But what if you need to determine the role a user is in using the APIs? How do you do that?

It turns out that the API for this is really rather straightforward.

Read the rest of this entry »