I am new to ASP and have never used session variables before. I am trying to pass the value of a dropdown box on a form to a session variable to be called by other pages in my site. I will post the code for a test I am using to get the code figured out:
Form (sending page):
<%@ Language=VBScript %>
<html>
<%
Session("varRedirectBus")=Request.Form("RedirectBus")
%>
<head>
<title></title>
</head>
<body background="\Training_Dept\WB00760_.gif">
<hr>
<hr>
<p><font size="6">Main Menu - Select Proper Database Menu</font></p>
<hr>
<hr>
<form ACTION="\Training_Dept\sessionTest.asp" METHOD="POST">
<b><u><i><font Size="4"><p>Select Yearly Menu:</font></i></u></b> <select
NAME="RedirectTo" tabindex="1" size="1">
<option Selected value=" ">--SELECT YEAR--</option>
<option value="MenuDefault02.asp">2002</option>
<option value="MenuDefault03.asp">2003</option>
<option value="MenuDefault04.asp">2004</option>
</select> <br>
<br>
<b><u><i><font Size="4"></p>
<p>Select Business:</font></i></u></b> <select NAME="RedirectBus" tabindex="1" size="1">
<option Selected value=" ">--SELECT BUSINESS--</option>
<option>Citi</option>
<option>Sears</option>
</select></p>
<p> <br>
Go To Correct Year: <input type="submit" name="submit1" value="submit" tabIndex="2"> </p>
<p>Reset Form: <input
id="reset1" type="reset" value="Reset" name="reset1" tabIndex="3"></p>
<p> </p>
<!--webbot bot="HTMLMarkup" startspan TAG="XBOT" --></SCRIPT><!--webbot bot="HTMLMarkup" endspan
-->
</form>
</body>
</html>
Recieving page:
<html>
<%@language="vbscript"%>
<%
response.write RedirectBus
Session("varRedirectBus")=Request.Form("RedirectBus")
%>
<head>
<title>Session Test</title>
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
</head>
<body>
<p>The Business chosen was <%=varRedirectBus%>!</p>
</body>
</html>
Can someone please help me, I am under some close deadlines and have been trying to figure this out for some time. All I get on the recieving page is the text.