loop over querystring


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: loop over querystring

  1. #1
    Brad Guest

    loop over querystring


    I programmed in ColdFusion for a couple of years and now I've changed jobs
    and I'm doing asp. How in asp do you loop over the querystring object and
    return all the variables being passed and their values. I can get the field
    names but not their values.

    Here's what I've got:

    <%
    Dim field
    for each field in request.queryString
    response.write(field)
    next
    %>

    This writes out the variable name but I don't know how to get the value.
    Any help would be greatly appreciated.

    Brad

  2. #2
    John K. Guest

    Re: loop over querystring

    Try this:

    <%
    Dim field
    for each field in request.queryString
    response.write request.querystring(field)
    next
    %>

    "Brad" <breynolds@kc.rr.com> wrote in message
    news:396c8fa8$1@news.devx.com...
    >
    > I programmed in ColdFusion for a couple of years and now I've changed jobs
    > and I'm doing asp. How in asp do you loop over the querystring object and
    > return all the variables being passed and their values. I can get the

    field
    > names but not their values.
    >
    > Here's what I've got:
    >
    > <%
    > Dim field
    > for each field in request.queryString
    > response.write(field)
    > next
    > %>
    >
    > This writes out the variable name but I don't know how to get the value.
    > Any help would be greatly appreciated.
    >
    > Brad




  3. #3
    Brad Guest

    Re: loop over querystring


    I now feel like a complete idiot but I thank you.

    "John K." <john.k@home.se> wrote:
    >Try this:
    >
    ><%
    >Dim field
    >for each field in request.queryString
    >response.write request.querystring(field)
    >next
    >%>
    >
    >"Brad" <breynolds@kc.rr.com> wrote in message
    >news:396c8fa8$1@news.devx.com...
    >>
    >> I programmed in ColdFusion for a couple of years and now I've changed

    jobs
    >> and I'm doing asp. How in asp do you loop over the querystring object

    and
    >> return all the variables being passed and their values. I can get the

    >field
    >> names but not their values.
    >>
    >> Here's what I've got:
    >>
    >> <%
    >> Dim field
    >> for each field in request.queryString
    >> response.write(field)
    >> next
    >> %>
    >>
    >> This writes out the variable name but I don't know how to get the value.
    >> Any help would be greatly appreciated.
    >>
    >> Brad

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center