Tim,

I believe the problem you're encountering lies within your do...loop
statement.  The code below will never pass the first record because of the
way you have the if...then statement setup -- it will redirect on the first
iteration.

I'd move the "hardset" url (the http://www.slo-pitch.com/provinces) redirect
after do...loop -- something like:

if request.QueryString("who") <> "" then
    do WHILE NOT rstDBEdit.EOF
         if request.QueryString("who") = rstDBEdit("Cat_NAme") then
              response.redirect("add.asp")
         end if
        rstDBEdit.movenext
    loop
    response.redirect("http://www.slo-pitch.com/provinces/"; &
request.QueryString("who") & "/gallery/add.asp")
END IF

You may also want to close/destroy the recordset before you do the redirect
:-)

HTH!

--Ben

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "ActiveServerPages" <[EMAIL PROTECTED]>
Sent: Thursday, October 31, 2002 3:28 PM
Subject: using a dropdown to redirect


>
>
> I must be tired...i populate a dropdown from my db and hard code a
> part...and if someone picks on of my subjects from the db, i want to
> redirect to a certain place, if hard code, to another...i am doing
something
> wrong though...code is below.
>
> if request.QueryString("who") <> "" then
> do WHILE NOT rstDBEdit.EOF
>      if request.QueryString("who") = rstDBEdit("Cat_NAme") then
>           response.redirect("add.asp")
>      else
>           response.redirect("http://www.slo-pitch.com/provinces/"; &
> request.QueryString("who") & "/gallery/add.asp")
>      end if
> rstDBEdit.movenext
> loop
> END IF
>
> ---
> You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
%%email.unsub%%


---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to