J
Jason
I have an ASP.NET page that needs to use values set in session
variables to perform certain functions. I have code in the Page_Load
event that makes sure the session has not been restarted:
If Session.IsNewSession Then
Response.Write("<script>alert('Your session has
expired.');window.close();</script>")
Exit Sub
End If
This code does catch a "new" session, but processing continues if a
button has been clicked on the page to that event handler. Therefore,
I'm still getting an application error when that function is looking
for session variables that are now equal to nothing. Is there some
function other than Exit Sub that will stop all further processing if
a condition is met from the Page_Load event?
variables to perform certain functions. I have code in the Page_Load
event that makes sure the session has not been restarted:
If Session.IsNewSession Then
Response.Write("<script>alert('Your session has
expired.');window.close();</script>")
Exit Sub
End If
This code does catch a "new" session, but processing continues if a
button has been clicked on the page to that event handler. Therefore,
I'm still getting an application error when that function is looking
for session variables that are now equal to nothing. Is there some
function other than Exit Sub that will stop all further processing if
a condition is met from the Page_Load event?