Hi there, I have a Security object that I would like to be created on each page of my application. So I thought best place to put this would be in the Master page vb file as it's included in every page. I have since read that it is best not to use the masterpage for this kind of thing as its meant for layout purposes. What would be the best way to get about this?
Also, my code for accessing the object created in the master page does not work:
Master page code:
Public diogelwch As Gwynedd.Diogelwch.Diogelwch
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
diogelwch = New Gwynedd.Diogelwch.Diogelwch(Request.ServerVariables("AUTH_USER"), Request.ServerVariables("REMOTE_ADDR"))
End Sub
And I have been trying to access the "diogelwch" object from my pages but with no luck :(
Thanks in advance.
http://www.gwynedd.gov.uk