CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ASP

  1. #1
    Join Date
    May 2001
    Posts
    2

    ASP

    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?


  2. #2
    Join Date
    Apr 2001
    Location
    CA
    Posts
    153

    Re: ASP

    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
    thanx/good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured