D
digbydog
Hello,
I am a bit confused with viewstate - am trying to use viewstate to hold a
boolean value which is false initially and then gets set to true after a
certain event.
I had the following
Class
....
Public mHitCounter As Boolean
Private Sub Page_Load(..)
If NOT IsNothing(ViewState("IncrementCounter")) Then
mHitCounter = ViewState("IncrementCounter")
End If
....
and in the relevant event
ViewState("IncrementCounter") = True
however whenever the page load event is reached the viewstate variable is
nothing even after it has been set to true. I have read a ferw articles but
can't quite work out what is going on. Any help would be much appreciated.
thanks
I am a bit confused with viewstate - am trying to use viewstate to hold a
boolean value which is false initially and then gets set to true after a
certain event.
I had the following
Class
....
Public mHitCounter As Boolean
Private Sub Page_Load(..)
If NOT IsNothing(ViewState("IncrementCounter")) Then
mHitCounter = ViewState("IncrementCounter")
End If
....
and in the relevant event
ViewState("IncrementCounter") = True
however whenever the page load event is reached the viewstate variable is
nothing even after it has been set to true. I have read a ferw articles but
can't quite work out what is going on. Any help would be much appreciated.
thanks