M
Mark
I have a single page with a HyperLink server control on it. When the page
loads the first time, I have code that executes once. When you click on the
hyperlink server control to redirect, the page load executes again which is
fine, but the IsPostBack evaluates to false.
BUT I have code I want to execute ONLY the first time the page is called.
How do I work around this?
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If (Not IsPostBack) Then
'Do something once
SomeMethodCall() 'But it executes BOTH times!
End If
End Sub
Thanks in advance!
Mark
loads the first time, I have code that executes once. When you click on the
hyperlink server control to redirect, the page load executes again which is
fine, but the IsPostBack evaluates to false.
BUT I have code I want to execute ONLY the first time the page is called.
How do I work around this?
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If (Not IsPostBack) Then
'Do something once
SomeMethodCall() 'But it executes BOTH times!
End If
End Sub
Thanks in advance!
Mark