D
David
Hi,
Every two seconds, the client callback starts sending a value to the server
(via javascript). That value can be empty or not. The session variable
"flag" gets the value "1" if the value is not empty (eventArgument length >
0).
My problem is: once session("flag")="1" , i want to keep that value till the
user leaves the page, even if the next value sent is empty.. But with this
code, the value "1" of session("flag) remains only till the next value is
empty. This page is never postbacked, so the initial value in Page_Load is
set only when the page is loaded.
Thanks
David
Public Sub RaiseCallbackEvent(ByVal eventArgument As String) _
Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent
If eventArgument.Length > 0 Then
Session("flag") = "1"
...
End If
If Session("flag") = "1" Then
...
Else
...
End If
End Sub
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Session("flag") = "0"
....
End Sub
Every two seconds, the client callback starts sending a value to the server
(via javascript). That value can be empty or not. The session variable
"flag" gets the value "1" if the value is not empty (eventArgument length >
0).
My problem is: once session("flag")="1" , i want to keep that value till the
user leaves the page, even if the next value sent is empty.. But with this
code, the value "1" of session("flag) remains only till the next value is
empty. This page is never postbacked, so the initial value in Page_Load is
set only when the page is loaded.
Thanks
David
Public Sub RaiseCallbackEvent(ByVal eventArgument As String) _
Implements System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent
If eventArgument.Length > 0 Then
Session("flag") = "1"
...
End If
If Session("flag") = "1" Then
...
Else
...
End If
End Sub
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
Me.Load
Session("flag") = "0"
....
End Sub