Hi,
On a link that I send users via email I have a code number on the end that
populates a field on the page and that number is fed into a database when the
user clicks the submit button. Properties of this button is "Push Button" &
"Submit" type.

http://www.xxxx.com/survey/users_interface/Results/submission_form.asp?snumber=134

What I want to do is to code the submission_form.asp so that if snumber is
greater than 400 then when the submit button is clicked, I want it to open
http://www.xxxx.com/survey/executive_interface/Results/survey.asp
otherwise I want it to automatically open
http://www.xxxx.com/survey/departmental_interface/Results/survey.asp

I really need help and I need to know exactly where to put the code.

Re: If Then Else by Jon

Jon
Wed Mar 09 17:01:53 CST 2005

Hi,
You could set the action of the form from the number, eg

<%
iNumber = cint(request.querystring("snumber"))
if iNumber > 400 then
sAction = "/survey/executive_interface/Results/survey.asp"
else
sAction = "/survey/departmental_interface/Results/survey.asp"
end if
%>
<form action = "<%=sAction%>" method="post">

--
Cheers,
Jon
Microsoft MVP


"Erin" <Erin@discussions.microsoft.com> wrote in message
news:DE4FDC2E-DD90-4A06-A790-46A761C8318E@microsoft.com...
> Hi,
> On a link that I send users via email I have a code number on the end that
> populates a field on the page and that number is fed into a database when
> the
> user clicks the submit button. Properties of this button is "Push Button"
> &
> "Submit" type.
>
> http://www.xxxx.com/survey/users_interface/Results/submission_form.asp?snumber=134
>
> What I want to do is to code the submission_form.asp so that if snumber is
> greater than 400 then when the submit button is clicked, I want it to open
> http://www.xxxx.com/survey/executive_interface/Results/survey.asp
> otherwise I want it to automatically open
> http://www.xxxx.com/survey/departmental_interface/Results/survey.asp
>
> I really need help and I need to know exactly where to put the code.



Re: If Then Else by Kevin

Kevin
Thu Mar 10 07:34:13 CST 2005

<%
If CInt(Request.QueryString("snumber")) > 400 Then
Response.Redirect("http://www.xxxx.com/survey/executive_interface/Results/survey.asp");
Else
Response.Redirect("http://www.xxxx.com/survey/executive_interface/Results/survey.asp")
End If
%>

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
What You Seek Is What You Get.

"Erin" <Erin@discussions.microsoft.com> wrote in message
news:DE4FDC2E-DD90-4A06-A790-46A761C8318E@microsoft.com...
> Hi,
> On a link that I send users via email I have a code number on the end that
> populates a field on the page and that number is fed into a database when
> the
> user clicks the submit button. Properties of this button is "Push Button"
> &
> "Submit" type.
>
> http://www.xxxx.com/survey/users_interface/Results/submission_form.asp?snumber=134
>
> What I want to do is to code the submission_form.asp so that if snumber is
> greater than 400 then when the submit button is clicked, I want it to open
> http://www.xxxx.com/survey/executive_interface/Results/survey.asp
> otherwise I want it to automatically open
> http://www.xxxx.com/survey/departmental_interface/Results/survey.asp
>
> I really need help and I need to know exactly where to put the code.