The correct term for this behavior is Authorization
Some things I need to know beforehand:
- Do you have your own Login / Logout Logic?
- Are you using a custom User database / table?
- If both of the above were answered with a
yes
: Have you read / heard something about Membership- and RoleProviders?
.NET has great built in mechanisms for solving this problem. It doesn't just offer great configuration possibilities, it is also very easy to implement!
Here is a very very detailed walk trough on the ASP.NET Membership Provider:
ASP.NET 2.0 Membership and Roles Tutorial Series
Even though it is using ASP.NET 2.0 and C#, it shouldn't really be that different on .NET3.5/4.0 and VB.NET