I got it to work by adding a rstDBEdit.MoveFirst right before the Do While Not..go figure... Thx!
-----Original Message----- From: Benjamin Garcia [mailto:bgarcia@;personify.ws] Sent: November 1, 2002 10:07 AM To: ActiveServerPages Subject: Re: using a dropdown to redirect Tim, I don't believe that the %20 gets passed back to you when using request.querystring(qParam) like syntax. The URLEncoded stuff will only come across when you call the entire collection -- something like strQueryVar = request.querystring . Have you tried doing a response.write on both request.querystring("who") and rstDBEdit("Cat_NAme") to see what they look like? I'd comment out the redirects and place a write in there to see whats going on -- someting like: if request.QueryString("who") <> "" then response.write "## DEBUG : START ##<br>" do WHILE NOT rstDBEdit.EOF response.write " ==> " & request.querystring("who") & " : " & rstDBEdit("Cat_NAme") & "<br>" ' if request.QueryString("who") = rstDBEdit("Cat_NAme") then ' response.redirect("add.asp") ' end if rstDBEdit.movenext loop response.write "## DEBUG : END ##<br>" response.end ' response.redirect("http://www.slo-pitch.com/provinces/" & request.QueryString("who") & "/gallery/add.asp") END IF HTH! --Ben ----- Original Message ----- From: "Tim" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Friday, November 01, 2002 7:44 AM Subject: Re: using a dropdown to redirect > Ben i treid the below code, but when i click submit soemthing that came > from the db, it tries to go to the > > response.redirect("http://www.slo-pitch.com/provinces/" & > request.QueryString("who") & "/gallery/add.asp") link with the Cat_name > as part of the url... > i'm wondering if perhaps the do not match becuase the "who" has %20 in it > due to spaces? > > ideas?? > > > 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.unsub%% --- 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]
