I have a web app that has a base page.
Each page needs to inherit from this base page as it contains properties they all need as well as dealing with the login rights.
My base page has some properties, eg: IsRole1, IsRole2, currentUserID, Role1Allowed, Role2Allowed.
On the init of each page I set the properties "Role1Allowed" and "Role2Allowed"
Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
Role1Allowed = True
Protected Overridable Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Role1Allowed And Not Role1 Then
Protected Overrides Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
After reading this, i found this: link to web config changes Should be perfect for ya.