p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: ASP help.......two list/menu selects with redirect to one new page?


Message #1 by IwillXcel@c... on Wed, 2 May 2001 13:30:23 EDT
	If you're experiencing a problem with this, make sure you do a Redirect
*BEFORE* you actually write *ANY* data to the browser (any at all).  The
first time you send information to the browser, the HTTP header is sent.  A
redirect needs to occur in the HTTP header which cannot be done if the
header has already been sent.

> What am I doing wrong or could I do better? Should I use a
> database instead
> of select case?

	You're comparing apples and jig saws here.  Select Case is a logical
execution path while a database stores information.  They do not work
interchangably.

? Chuck

> -----Original Message-----
> From: IwillXcel@c... [mailto:IwillXcel@c...]
> Sent: Wednesday, May 02, 2001 1:30 PM
> To: Code Clinic
> Subject: [proasp_codeclinic] ASP help.......two list/menu selects with
> redirect to one new page?
>
>
> I am new to ASP and am trying to use Select Case to redirect to a new web
> page based on user input. Example, redirect to a red with blue border web
> page named "redblue.asp" I am using two list/menu form inputs.
> One "Red" and
> one "Blue" form action submitted to
>
> "previewpage.asp" (with code......................)
>
>
> <%
> varColors = request.form("colors")
>
>
> select case varColors
> case "Red,Blue"
>      response.redirect ("www.anydomain.com/redblue.asp")
> case "Red,Royal Blue"
>      response.redirect ("www.anydomain.com/redRoyal.asp")
>
> end select
> %>
>
>
>
> What am I doing wrong or could I do better? Should I use a
> database instead
> of select case?
>
>
> Thanks Anyone!


  Return to Index