Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting text value from option list

Status
Not open for further replies.

blueindian1

Programmer
Apr 24, 2001
150
US
hello,

is it possible to get the text value from an option list using only ASP?

so if i have
<option value=&quot;1&quot;>One</option>

i want to pull the &quot;One&quot; from the form.

thanks,

rich
 
<option value=&quot;1&quot; name=&quot;first&quot;>One</option>


Will Request.Form(&quot;first&quot;) work?
 
you have to change some things and what ever is selected wilkl pass with the form submission
like this (change the value!)
<html>
<body>
<form method=&quot;get&quot; action=&quot;show.asp&quot;>
<SELECT NAME=&quot;sel&quot;>
<option value=&quot;One&quot;>One</option>
<option value=&quot;Two&quot;>Two</option>
</SELECT>
<input type=&quot;submit&quot; value=&quot;show&quot;>
</form>
</body>
</html>

read the selected

<%
Response.Write(Request.QueryString(&quot;sel&quot;))
%> [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top