Deleting selected value from ListBox

Rezner
03-20-2002, 11:12 AM
I'm new to ASP, so bear with me.

If I have this:


<form name=formDelete method=post action=delete.asp>
<SELECT style='WIDTH: 239px; HEIGHT: 154px' size=10 name=lstPeople>
(****List populated here*****)
</SELECT>
<INPUT Type=submit value=Delete>
</form>


on a ASP form, it opens up the delete.asp form just fine. But in delete.asp I have:


response.write request.form("lstpeople")


to test it and all i get is the number 1. I need to have the actual text value that was selected in the Listbox from the other .asp form.

How do I do this?

Thinker
03-20-2002, 04:20 PM
Let me quote from my ASP book.

You may add a value attribute to each option. If the value
attribute exists, the browser returns the value when the user
submits the form; otherwise, it returns the text of the option.

My guess is you have value=1 in your option tag.

Rezner
03-20-2002, 07:15 PM
Yeah, that was the problem. Doh.... guess it's just better to leave off the Value part.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum