Troy Erickson
April 30th, 2003, 11:11 AM
I have a class and in the class I declared a variable public. In the page load event I set the variable to a value. When a user presses a button I reference the variable. For some reason that variable always loses its value. Why??????
Public Class Motion
public NextOne as integer
Private Sub Page_Load
NextOne = 4
End Sub
Private Sub OnButton
dim i as integer
i = NextOne
End Sub
End class
This is a very rough layout that I am doing. I trace through pageload and nextone is equal 4 but as soon as onbutton is called it changes to zero.
Public Class Motion
public NextOne as integer
Private Sub Page_Load
NextOne = 4
End Sub
Private Sub OnButton
dim i as integer
i = NextOne
End Sub
End class
This is a very rough layout that I am doing. I trace through pageload and nextone is equal 4 but as soon as onbutton is called it changes to zero.