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

B

Belinda

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
 
J

James Baker

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
 
P

Patrice

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
 
B

Belinda

Patrice said:
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

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
 
R

Roland Hall

in message
: > 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" <[email protected]> a écrit dans le message de
: > : > > 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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top