S
Scott
I'm trying to set a session variable after displaying a form, then capture
the Session variable on postback. For some reason, the below code always
returns the form, not the "Step 2" results part.
What am I doing wrong? It's on a local network server, not on the web if
that matters.
<%
'* Step 2: Display results
'**********************************************
If Session("PageAction") = "view2" Then
Response.Write "Results"
'* Step 1: Display form
'**********************************************
Else
%>
<form name="myform" method="post" action="postback.asp">
<%
Session.Contents.RemoveAll()
Session("PageAction") = "view2"
%>
<input type="submit" value="View Results" name="submit1">
<%
End If
%>
the Session variable on postback. For some reason, the below code always
returns the form, not the "Step 2" results part.
What am I doing wrong? It's on a local network server, not on the web if
that matters.
<%
'* Step 2: Display results
'**********************************************
If Session("PageAction") = "view2" Then
Response.Write "Results"
'* Step 1: Display form
'**********************************************
Else
%>
<form name="myform" method="post" action="postback.asp">
<%
Session.Contents.RemoveAll()
Session("PageAction") = "view2"
%>
<input type="submit" value="View Results" name="submit1">
<%
End If
%>