How to pass the query string in a web form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DaveRook
    New Member
    • Jul 2007
    • 147

    #1

    How to pass the query string in a web form

    I am using a web form which populates radio buttons via a loop.

    Each radio button in the form is numbered by the loop so if there needs to be 3 radio buttons, they are named rad1, rad2 and rad3.

    The page url already contains a querystring (eg, ?a=12&b=34).

    When some one clicks next button, the new querystring is added to the next page but the original is removed. How do I keep both?

    I have tried <form name ="x" action="page2.a sp?<%=request.q uerystring%> method="get">

    <form name ="x" action="page2.a sp?<%=request.q uerystring%>>

    and even

    <input name ="page1" type="hidden" value=<%=Reques t.QueryString%> >

    The problem with the hidden file, is it displays the & symbol as %26 and the equals as %26%2361%3B in the URL

    Any ideas? I would like the querystring to be displayed verbatum if possible!

    Or do i have to use the hidden type and loop it to re-create all the querystrings again to re-add them one by one?

    Thanks

    Dave
  • DaveRook
    New Member
    • Jul 2007
    • 147

    #2
    Ignore above!! I'm going to stick the results into sessions or cookies

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      that'll work, sorry it took me so long to get back to you. I was going to suggest this:
      Code:
      dim newQueryString
      for each x in request.querystring
         newQueryString = newQueryString + x.name + "=" + request.querystring(x.name) + "&"
      next
      in other words, make your own querystring. Anyway, putting into cookies is probably a better solution in the long run.

      Jared

      Comment

      Working...