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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP Help

Status
Not open for further replies.

gio2888

Technical User
Oct 26, 2000
64
US
I have 2 asp pages, one is call the 1099.asp and the other is rpt.asp. In the rpt.asp, there is a form which has a drop down(select menu) with years on it and a "go" button. What I want to do is that after I selected the year and click "go", the year will be an input parameter for 1099.asp. If u are confused then let me reword myself. After I select year and click go, the year say 2001 and one will be a variable within 1099.asp, where I can use it in the page.
 
If you have the form containing the select box directed to the other page, all you need to do is request the form item and assign it:

rpt.asp
--------------------
<form method='post' action='1099.asp'>
<select name='year'>
<option value='1'>1
<option value='2'>2
<option value='3'>3
</select>
<input type='submit' value='Submit'>
</form>



1099.asp
--------------------
<%
Dim theYear
theYear = Request.Form(&quot;year&quot;)

Response.write(&quot;You chose: &quot; & theYear)
%>



Hope this helps. -Ovatvvon :-Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top