If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Send value from Drop Down Selection

I have a Drop Down list populated from an SQL DB and then a submit button to send the selection as a URL Parameter to get details on the next ASP page. I need to be able to send an ID with that in the URL parameter based on the selection I made. I have tried using a hidden field but the ID that gets sent is just the first one in the list and I need it to be the ID in the SQL table of what was selected in the drop down.

Thanks for the reply.....I realize this is crappy dreamweaver code but it's the only way I know how to do this stuff sorry.....

Landname is the dropdown field I have and I select one of those and then click submit to get the detail for that Landname. I need to send over the ID that's in the same table for that selection in the URL Parameter on the detail page.

OK, I have gotten the data I need in the string but I can't get it to show properly in the link. I didn't understand the last section where I would do that. Here's what I've done, I'm not sure if I'm close to correct since it strays away from your initial code a little bit.

Here's the current code I have for the string:

Code:

<option value="<%=name & id%>"><%=name%></option>

Which brings me back this:
LandmarkInfo.asp?Landname=WASHINGTONMONUMENT5864

All I need is the &ID=5864 to be there and it will be good but I didn't understand where that code went to accomplish that??

Okay, try this replacement. (I truly *HATE* DreamWeaver code. I cleaned up a lot of it, but not all. But enough to make this somewhat more efficient, at least. The stuff in red is the important part. Other changes not as important, but they will make your code more efficient if you use them.)