Processing querystring ...

Discussion in 'ASP General' started by Raj, Aug 4, 2006.

  1. Raj

    Raj Guest

    <html>
    <body>
    <script language="javascript">
    locatin.href="splchars.asp?filenames=funnel slab beam bldg #15.txt;slab @ el
    246.50 # 15.txt"
    </script>
    </body>
    </html>

    spchars.asp
    -----------
    <%
    Response.write Server.URLEncode(Request("filenames"))
    Response.write Server.URLPathEncode(Request("filenames"))
    Response.write Server.HTMLEncode(Request("filenames"))
    %>

    None of the above methods allow me to read query string as same as it was
    sent to the page ( i.e funnel slab beam bldg #15.txt;slab @ el 246.50 #
    15.txt )

    Any workarounds?
    Raj, Aug 4, 2006
    #1
    1. Advertising

  2. Raj

    McKirahan Guest

    "Raj" <> wrote in message
    news:#pAs#...
    > <html>
    > <body>
    > <script language="javascript">
    > locatin.href="splchars.asp?filenames=funnel slab beam bldg #15.txt;slab @

    el
    > 246.50 # 15.txt"
    > </script>
    > </body>
    > </html>
    >
    > spchars.asp
    > -----------
    > <%
    > Response.write Server.URLEncode(Request("filenames"))
    > Response.write Server.URLPathEncode(Request("filenames"))
    > Response.write Server.HTMLEncode(Request("filenames"))
    > %>
    >
    > None of the above methods allow me to read query string as same as it was
    > sent to the page ( i.e funnel slab beam bldg #15.txt;slab @ el 246.50 #
    > 15.txt )
    >
    > Any workarounds?


    It's "location.href=" not "locatin.href=".

    Try:

    <html>
    <body>
    <script type="text/javascript">
    var qs = "funnel slab beam bldg #15.txt;slab @ el 246.50 # 15.txt";
    location.href="qs.asp?filenames=" + escape(qs);
    </script>
    </body>
    </html>

    <%
    Response.Write Request.QueryString("filenames")
    %>
    McKirahan, Aug 5, 2006
    #2
    1. Advertising

  3. Raj

    McKirahan Guest

    "McKirahan" <> wrote in message
    news:...

    [snip]

    > location.href="qs.asp?filenames=" + escape(qs);


    [snip]

    Sorry, I changed the ASP name for my testing -- it should be:

    location.href="splchars.asp?filenames=" + escape(qs);
    McKirahan, Aug 5, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. suzy
    Replies:
    3
    Views:
    3,084
  2. Axel Dahmen

    Pack QueryString

    Axel Dahmen, Jun 29, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    533
    Axel Dahmen
    Jun 29, 2003
  3. Mehdi
    Replies:
    6
    Views:
    36,094
    sloan
    Apr 6, 2006
  4. Hubert Hung-Hsien Chang
    Replies:
    2
    Views:
    421
    Michael Foord
    Sep 17, 2004
  5. Adeel Ahmad
    Replies:
    1
    Views:
    423
    Anthony Jones
    Mar 7, 2006
Loading...

Share This Page