J
Josh Schmidt
I'm building a master page that contains 2 user controls. When any page in
the site loads it will create an object (objUser). The objUser constructer
checks to see if a user cookie exists and if it does will populate a series
of properties including IsLoggedIn. If objUser.IsLoggedIn = False, then the
login user control is displayed. When the user logs (objUser.Login method)
the cookie is created, properties are populated and IsLoggedIn is set to True.
The other user control is a navigation control that will display different
options depending on the type of user. This will check objUser.Type.
Here is my question: How can I create objUser on the master page and
reference it in the code behind for the user controls? Right now I'm
creating the object 3 times, once when the page loads, once when the nav user
control loads, and once when the login control click event fires.
Thanks!
the site loads it will create an object (objUser). The objUser constructer
checks to see if a user cookie exists and if it does will populate a series
of properties including IsLoggedIn. If objUser.IsLoggedIn = False, then the
login user control is displayed. When the user logs (objUser.Login method)
the cookie is created, properties are populated and IsLoggedIn is set to True.
The other user control is a navigation control that will display different
options depending on the type of user. This will check objUser.Type.
Here is my question: How can I create objUser on the master page and
reference it in the code behind for the user controls? Right now I'm
creating the object 3 times, once when the page loads, once when the nav user
control loads, and once when the login control click event fires.
Thanks!