Click to See Complete Forum and Search --> : ASP


RonPepe
June 8th, 2001, 03:15 PM
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?

forty7
June 13th, 2001, 03:55 PM
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
...
&ltFORM id=frmFilter method=post action=page2.asp>
&ltSELECT id=cboProcess name=cboProcess style="HEIGHT: 22px; WIDTH: 126px">
&ltOPTION selected>ALL&lt/OPTION>
&ltOPTION>PERMITS&lt/OPTION>
&ltOPTION>APPEALS&lt/OPTION>&lt/SELECT>
&lt/FORM>&lt!-- END OF frmFilter -->
...


page2.asp
...
&lt%
dim strQueryValue

strQueryValue = Request.Form("cboProcess")

%>
...


thanx/good luck,
adam