I have one ASP page with a dropdown list. The user makes a selection from the list. I want to use that selection as criteria for an SQL statement on another page. HOW do I get the selection from the other page?
Printable View
I have one ASP page with a dropdown list. The user makes a selection from the list. I want to use that selection as criteria for an SQL statement on another page. HOW do I get the selection from the other page?
On the first page, your dropdown (i assume this is a select control) needs a name and needs to be on a form. If you then submit this form to your second page, you can ask the Request object what the value of your dropdown was. Hopefully this can get you started:
page1.asp
...
<FORM id=frmFilter method=post action=page2.asp>
<SELECT id=cboProcess name=cboProcess style="HEIGHT: 22px; WIDTH: 126px">
<OPTION selected>ALL</OPTION>
<OPTION>PERMITS</OPTION>
<OPTION>APPEALS</OPTION></SELECT>
</FORM><!-- END OF frmFilter -->
...
page2.asp
...
<%
dim strQueryValue
strQueryValue = Request.Form("cboProcess")
%>
...
thanx/good luck,
adam