PDA

View Full Version : Can I use a session variable to hold the page I want to navigate to?



meridian2000
06-13-2006, 08:12 AM
Can I use a session variable to hold the page I want to navigate to? I've used the code below without much success, can anyone help please?

<%
dim homemenu
homemenu = session("HomePage")
response.write homemenu ' I've used this just to prove it's holding the page address
%>


<form method="get" action=homemenu>
<p align="center"><input type="submit" value="home Page" name="B1"></p>
</form>

jscheuer1
06-22-2006, 09:14 AM
That would be:


<form method="get" action="<%=homemenu%>">
<p align="center"><input type="submit" value="home Page" name="B1"></p>
</form>

The trouble with session variables is that they can timeout. There are ways to ensure that this doesn't happen (at least 99% of the time) but, I am not all that familiar with them yet.