Redirect Based On FrontPage Database Results

J

jpenny

Using FrontPage Database Results, what is the easiest way for me to
accomplish the following.

On pg1 I have a form with a single textbox for users to enter an
OrderNumber. Then I need to redirect depending on another field that
would be returned called Disposition. If Disposition =1 then go to
results1.asp or if Disposition=2 then go to results2.asp. I've
exhausted my google searching capabilities and hope someone can point
me in the right direction.
 
S

Stefan B Rusynko

Send the form to one of your results page (say results1.asp)
At the top of results1.asp collect all the form variables and save them as session variables
- then if the variable Disposition=2 response redirect to results2.asp

<%
Session("Disposition") = Request.Form("Disposition")
IF Len(Session("Disposition"))<1 THEN Response.Redirect "yourformpage.asp"
'other variables here
'Session("formfield2") = Request.Form("formfield2")

IF Session("Disposition")="2" THEN Response.Redirect "results2.asp"

%>

Just use the below on either page to display/use the form results

<%=Session("Disposition")%>
<%=Session("formfield2")%>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Using FrontPage Database Results, what is the easiest way for me to
| accomplish the following.
|
| On pg1 I have a form with a single textbox for users to enter an
| OrderNumber. Then I need to redirect depending on another field that
| would be returned called Disposition. If Disposition =1 then go to
| results1.asp or if Disposition=2 then go to results2.asp. I've
| exhausted my google searching capabilities and hope someone can point
| me in the right direction.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top