SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing QueryString values

    I need to pass a lot of QS variables to another page. Problem is, the form being submitted is dynamic, so I don't always know how many values I am going to be passing.

    At work, we use Site Server Commerce Edition which has a nice function to pass all the QS variables ( mscsPage.URLShopperArgs() ), but it seems like this only works in the Commerce Sites because the object needed to make this function work is only available in SiteServer web sites.

    Is there a way to grab all the values from the QueryString and place them into a link or form?

    <a href = "http://daniel/update.asp?brand1=reebok&......&brand52=REEBOK">



    I have the values coming to a page, where the user verifies the info and clicks a button to either continue on and output the info to word or he goes back to modify the data. Either way I need to pass the variables on.
    Last edited by moospot; Mar 26, 2002 at 12:20.

  2. #2
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you loop through them? This code will output a form and write it to the screen. you would have to assign a variable that would increment as well (ie var1, var2, etc). I'm not totally sure how to do it, just thinking as I type this.

    --------------------

    <%'loop through the request.form fields and output the information
    For Each field In Request.Form
    %>
    <tr>
    <td><%= field %></td>
    <td><%= request.form(field) %></td>
    </tr>
    <% next %>

  3. #3
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep, I can loop through them, but I was wondering if there was some sort of built-in ASP function that would pass all the values instead.

  4. #4
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    INteresting...

    If you use the following code

    <%= Request.QueryString %>

    It will display all the querstring variables.

    You can use this with a URL like so:

    Response.Redirect("page.asp" & Request.QueryString)

  5. #5
    SitePoint Wizard bbolte's Avatar
    Join Date
    Nov 2001
    Location
    The Central Plains
    Posts
    3,304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    does it just pass them to the url? how then do you capture them?

  6. #6
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was looking to capture the whole QS, not just each individual item. The Request.QueryString will show you all the items in the QS.

    You just use it like a variable as in my previous post.

  7. #7
    Xbox why have you forsaken me? moospot's Avatar
    Join Date
    Feb 2001
    Location
    Clearwater, FL
    Posts
    3,615
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Found this pretty neat code

    [vbs]
    For Each Key In Request.QueryString
    response.write("<P>" & Key & "<BR>")
    response.write(Request.QueryString(Key) & "</P>")
    Next
    [/vbs]


Bookmarks

Posting Permissions

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