R
refer_to_website
In my VB.NET web application, I created a class module called "Person"
with various properties and methods. The Login method reads the
person's data (name, address, etc.) from a database. The web screens
access the database via getters and setters in the Person class
module.
The code-behind of my home page's login button has
dim oCurrentPerson As New Person
oCurrentPerson.Login (me.txtUserName.text, me.txtPassword.text)
Response.Redirect ("detail.aspx")
On the second form (detail.aspx), oCurrentPerson is not accessible
(it's out of scope). Where / how can I declare oCurrentPerson so that
I can access it on all the forms of my web site?
I've tried Public and Static. I've tried dimensioning it in
global.asax or at the top of the home page without success.
with various properties and methods. The Login method reads the
person's data (name, address, etc.) from a database. The web screens
access the database via getters and setters in the Person class
module.
The code-behind of my home page's login button has
dim oCurrentPerson As New Person
oCurrentPerson.Login (me.txtUserName.text, me.txtPassword.text)
Response.Redirect ("detail.aspx")
On the second form (detail.aspx), oCurrentPerson is not accessible
(it's out of scope). Where / how can I declare oCurrentPerson so that
I can access it on all the forms of my web site?
I've tried Public and Static. I've tried dimensioning it in
global.asax or at the top of the home page without success.