Post the results of dropdownbox to URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Billie Hartline
    New Member
    • Jan 2011
    • 7

    Post the results of dropdownbox to URL

    I have no IT trainig but would appreciate some help. I am a volunteer that assist several non-profit organizations.

    I have a dropdown box - code follows:
    Code:
     <asp:DropDownList id="DropDownListcofc" runat="server" DataSourceID="AccessDataSource1" DataTextField="Certify" DataValueField="Certify" Height="16px">
    				</asp:DropDownList>
    Using a hyperlink I am attempting to post the selection from the box to the URL on the page that follows - code follows:
    Code:
    ;<a href='http://www.gejfa.net/billie/guidingprinciples.aspx?ID=<%= Request.QueryString("ID") %>&amp;CofC=<%= Request.Form("Certify") %>

    The value of the ID post to the URL but the dropdown box doesn't. URL follows:
    Code:
    ;<[http://www.gejfa.net/billie/guidingprinciples.aspx?ID=22&CofC=

    Can someone please help. Thanks Billie
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Now this is interesting, the page that sends the form appears to be asp.net, but the page that receives the form appears to be classic asp.

    There are a couple possibilities that occur to me. 1- you might not be sending the form at all. 2- your asp.net page might be converting the form to querystring data instead of the default.

    There is a simple way in classic asp to list all the info that was sent, whether as part of the url (querystring) or as a form submission. I suggest you try this in the classic asp page that handles the input. This will tell you what was sent and how.
    Code:
    for each x in request.form
       Response.write x & "(form): " & request.form(x) & "<br>" & vbnewline 
    Next
    For each x in request.querystring
       Response.write x & "(url): " & request.querystring(x) & "<br>" & vbnewline
    Next
    let me know what this give you.

    Jared

    Comment

    • Billie Hartline
      New Member
      • Jan 2011
      • 7

      #3
      Jared Thank you for responding - I got the following error message:

      Compilation Error
      Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

      Compiler Error Message: BC30451: Name 'x' is not declared.

      Source Error:



      Line 63: End If
      Line 64: %>
      Line 65: <%for each x in request.form
      Line 66: Response.write x & "(form): " & request.form(x) & "<br>" & vbnewline
      Line 67: Next

      I don't understand your comment "asp.net, but the page that receives the form appears to be classic asp. " both forms have .aspx extensions? I did change teh language in the receivind document to get it to recognize the ID variable.

      Billie

      Thanks




      Source File: d:\hosting\blin e123\billie\cod eofconduct1.asp x Line: 65

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        If they both have extension .aspx then they are both asp.net. (Btw, this is a classic asp forum, but there is an asp.net forum on bytes). Anyway, so you got it to work?

        Comment

        • Billie Hartline
          New Member
          • Jan 2011
          • 7

          #5
          No I got the error message above.

          Comment

          • jhardman
            Recognized Expert Specialist
            • Jan 2007
            • 3405

            #6
            Ok, the code I gave you probably won't work in asp.net. I've moved this thread to the asp.net forum to hopefully get better responses.

            Comment

            • stepterr
              New Member
              • Nov 2007
              • 157

              #7
              Shouldn't
              Code:
              Request.Form("Certify")
              be
              Code:
              Request.Form("DropDownListcofc")

              Comment

              Working...