How to pass a long parameter string to a ASP page via Post parameters

Discussion in 'ASP General' started by Belinda, Jun 4, 2004.

  1. Belinda

    Belinda Guest

    Hello All

    I have the following test.asp page which needs one parameter querystr
    but my querystr is a very long string value. When I send a long value
    the query string is getting truncated after some characters.

    Can you please kindly share the code segment to workaround how to pass
    such a long string value to a asp page. This is how I invoke the test
    page:

    http://localhost/?querystr=select ............ from xxxxx

    'test.asp
    <html>
    <body>

    <%

    response.write("Hello World!")
    w=request.querystring("querystr")

    response.write "<td><p></td>" & w
    %>

    </body>
    </html>


    but part of my query string never gets passed to the asp page appears
    asp as a limitation on max string length can you please provide me a
    workaround how I can overcome and pass the right string to asp. Please
    post the code snippet.

    Thanks
    Belinda
     
    Belinda, Jun 4, 2004
    #1
    1. Advertising

  2. That's not a POST, that's a GET.

    http://www.aspfaq.com/2222
    http://www.aspfaq.com/2223

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "Belinda" <> wrote in message
    news:...
    > Hello All
    >
    > I have the following test.asp page which needs one parameter querystr
    > but my querystr is a very long string value. When I send a long value
    > the query string is getting truncated after some characters.
    >
    > Can you please kindly share the code segment to workaround how to pass
    > such a long string value to a asp page. This is how I invoke the test
    > page:
    >
    > http://localhost/?querystr=select ............ from xxxxx
    >
    > 'test.asp
    > <html>
    > <body>
    >
    > <%
    >
    > response.write("Hello World!")
    > w=request.querystring("querystr")
    >
    > response.write "<td><p></td>" & w
    > %>
    >
    > </body>
    > </html>
    >
    >
    > but part of my query string never gets passed to the asp page appears
    > asp as a limitation on max string length can you please provide me a
    > workaround how I can overcome and pass the right string to asp. Please
    > post the code snippet.
    >
    > Thanks
    > Belinda
     
    Aaron [SQL Server MVP], Jun 4, 2004
    #2
    1. Advertising

  3. Belinda

    James Baker Guest

    From what I can remember, there's something like a 256 character limit on a
    querystring value. Might not be exact, but I'm almost positive there's a
    limit. Why don't you use a traditional post to the other page (setting
    action="2ndPage.asp" and method="post") and do a Request.Form("name")? Is
    there some reason you have to avoid that approach?

    James
     
    James Baker, Jun 4, 2004
    #3
  4. Belinda

    Patrice Guest

    You can't pass more than 2048 characters in the querystring (for IE, this is
    browser dependant, don"t know for others).
    You may want to use POST instead.

    Also what is your scenario ? Is this string needed client side ? you may
    want to avoid to expose this string as this could represent quite a high
    risk.

    If this is for inter applications communication, you may want to enchance
    this mechanism (encryption, standard package such as the SOAP SDK ?)

    Patrice

    > Belinda" <> a écrit dans le message de

    news:...
    > Hello All
    >
    > I have the following test.asp page which needs one parameter querystr
    > but my querystr is a very long string value. When I send a long value
    > the query string is getting truncated after some characters.
    >
    > Can you please kindly share the code segment to workaround how to pass
    > such a long string value to a asp page. This is how I invoke the test
    > page:
    >
    > http://localhost/?querystr=select ............ from xxxxx
    >
    > 'test.asp
    > <html>
    > <body>
    >
    > <%
    >
    > response.write("Hello World!")
    > w=request.querystring("querystr")
    >
    > response.write "<td><p></td>" & w
    > %>
    >
    > </body>
    > </html>
    >
    >
    > but part of my query string never gets passed to the asp page appears
    > asp as a limitation on max string length can you please provide me a
    > workaround how I can overcome and pass the right string to asp. Please
    > post the code snippet.
    >
    > Thanks
    > Belinda
     
    Patrice, Jun 4, 2004
    #4
  5. Belinda

    Belinda Guest

    "Patrice" <> wrote in message news:<#>...
    > You can't pass more than 2048 characters in the querystring (for IE, this is
    > browser dependant, don"t know for others).
    > You may want to use POST instead.
    >
    > Also what is your scenario ? Is this string needed client side ? you may
    > want to avoid to expose this string as this could represent quite a high
    > risk.
    >
    > If this is for inter applications communication, you may want to enchance
    > this mechanism (encryption, standard package such as the SOAP SDK ?)
    >
    > Patrice
    >
    > > Belinda" <> a écrit dans le message de

    > news:...
    > > Hello All
    > >
    > > I have the following test.asp page which needs one parameter querystr
    > > but my querystr is a very long string value. When I send a long value
    > > the query string is getting truncated after some characters.
    > >
    > > Can you please kindly share the code segment to workaround how to pass
    > > such a long string value to a asp page. This is how I invoke the test
    > > page:
    > >
    > > http://localhost/?querystr=select ............ from xxxxx
    > >
    > > 'test.asp
    > > <html>
    > > <body>
    > >
    > > <%
    > >
    > > response.write("Hello World!")
    > > w=request.querystring("querystr")
    > >
    > > response.write "<td><p></td>" & w
    > > %>
    > >
    > > </body>
    > > </html>
    > >
    > >
    > > but part of my query string never gets passed to the asp page appears
    > > asp as a limitation on max string length can you please provide me a
    > > workaround how I can overcome and pass the right string to asp. Please
    > > post the code snippet.
    > >
    > > Thanks
    > > Belinda


    Many thanks for all your views.

    Actually this parameter passing and running of this URL will not be
    from IE I will do it from a Excel web query. So security should not be
    a issue.

    Can you kindly let me know how I can do it using POST some samples of
    doing it just like passing it in the URL parameter.

    Thanks
    Belinda
     
    Belinda, Jun 5, 2004
    #5
  6. Belinda

    Roland Hall Guest

    "Belinda" wrote in message
    news:...
    : "Patrice" <> wrote in message
    news:<#>...
    : > You can't pass more than 2048 characters in the querystring (for IE,
    this is
    : > browser dependant, don"t know for others).
    : > You may want to use POST instead.
    : >
    : > Also what is your scenario ? Is this string needed client side ? you may
    : > want to avoid to expose this string as this could represent quite a high
    : > risk.
    : >
    : > If this is for inter applications communication, you may want to
    enchance
    : > this mechanism (encryption, standard package such as the SOAP SDK ?)
    : >
    : > Patrice
    : >
    : > > Belinda" <> a écrit dans le message de
    : > news:...
    : > > Hello All
    : > >
    : > > I have the following test.asp page which needs one parameter querystr
    : > > but my querystr is a very long string value. When I send a long value
    : > > the query string is getting truncated after some characters.
    : > >
    : > > Can you please kindly share the code segment to workaround how to pass
    : > > such a long string value to a asp page. This is how I invoke the test
    : > > page:
    : > >
    : > > http://localhost/?querystr=select ............ from xxxxx
    : > >
    : > > 'test.asp
    : > > <html>
    : > > <body>
    : > >
    : > > <%
    : > >
    : > > response.write("Hello World!")
    : > > w=request.querystring("querystr")
    : > >
    : > > response.write "<td><p></td>" & w
    : > > %>
    : > >
    : > > </body>
    : > > </html>
    : > >
    : > >
    : > > but part of my query string never gets passed to the asp page appears
    : > > asp as a limitation on max string length can you please provide me a
    : > > workaround how I can overcome and pass the right string to asp. Please
    : > > post the code snippet.
    : > >
    : > > Thanks
    : > > Belinda
    :
    : Many thanks for all your views.
    :
    : Actually this parameter passing and running of this URL will not be
    : from IE I will do it from a Excel web query. So security should not be
    : a issue.
    :
    : Can you kindly let me know how I can do it using POST some samples of
    : doing it just like passing it in the URL parameter.

    Belinda...

    You're just typing this in on the address line or what?

    To POST, you set method="post" in a form and submit the form to your target
    ..asp page.

    --
    Roland Hall
    /* This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose. */
    Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
    WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
    MSDN Library - http://msdn.microsoft.com/library/default.asp
     
    Roland Hall, Jun 5, 2004
    #6
    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. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    728
    Eric Sosman
    Jul 8, 2003
  2. Daniel Rudy

    unsigned long long int to long double

    Daniel Rudy, Sep 19, 2005, in forum: C Programming
    Replies:
    5
    Views:
    1,236
    Peter Shaggy Haywood
    Sep 20, 2005
  3. Mathieu Dutour

    long long and long

    Mathieu Dutour, Jul 17, 2007, in forum: C Programming
    Replies:
    4
    Views:
    507
    santosh
    Jul 24, 2007
  4. Bart C

    Use of Long and Long Long

    Bart C, Jan 9, 2008, in forum: C Programming
    Replies:
    27
    Views:
    840
    Peter Nilsson
    Jan 15, 2008
  5. Matt
    Replies:
    5
    Views:
    408
    Aaron Bertrand - MVP
    May 4, 2004
Loading...

Share This Page