469,290 Members | 1,882 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,290 developers. It's quick & easy.

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

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
Jul 19 '05 #1
5 13520
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" <be********@yahoo.com> wrote in message
news:41**************************@posting.google.c om...
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

Jul 19 '05 #2
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
Jul 19 '05 #3
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" <be********@yahoo.com> a écrit dans le message de news:41**************************@posting.google.c om... 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

Jul 19 '05 #4
"Patrice" <no****@nowhere.com> wrote in message news:<#Z**************@TK2MSFTNGP09.phx.gbl>...
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" <be********@yahoo.com> a écrit dans le message de

news:41**************************@posting.google.c om...
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
Jul 19 '05 #5
"Belinda" wrote in message
news:41*************************@posting.google.co m...
: "Patrice" <no****@nowhere.com> wrote in message
news:<#Z**************@TK2MSFTNGP09.phx.gbl>...
: > 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" <be********@yahoo.com> a écrit dans le message de
: > news:41**************************@posting.google.c om...
: > > 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
Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Salmo Bytes | last post: by
7 posts views Thread by Zlatko Matiæ | last post: by
5 posts views Thread by Ben | last post: by
5 posts views Thread by Apollo0130 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.