469,282 Members | 1,921 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

passing XML querystring

i want to pass XML data in querystring from one to another asp page.
it is about 10000 characters long, i cannot use FORM because it is
already nested in one.
What i do is i have IFRAME and im passing some xml data
in QUERYSTRING. It doesnt work somehow, im using javascript escape
method to substitute escape characters, but most of characters are
being truncated (about 300-500 left).
Are there limits in querystring length?
what else should i try??

any help appreciated
Nov 12 '05 #1
2 6644
Can't you use POST?
Post it like this:
public static void PostData ( string destURL, string data )
{

WebRequest r = WebRequest.Create(destURL);
r.Method = "POST";
r.ContentType = "application/x-www-form-urlencoded";
StreamWriter w = new StreamWriter(r.GetRequestStream());
w.Write(data);
w.Close();
}
Then use Request.InputStream to read the data.

PS
Yes there is a limit for the querystring length, although i am not sure what
it is.
--
Regards,
Dennis JD Myrén
Oslo Kodebureau
"Marcin" <sm*******@interia.pl> wrote in message
news:54**************************@posting.google.c om...
i want to pass XML data in querystring from one to another asp page.
it is about 10000 characters long, i cannot use FORM because it is
already nested in one.
What i do is i have IFRAME and im passing some xml data
in QUERYSTRING. It doesnt work somehow, im using javascript escape
method to substitute escape characters, but most of characters are
being truncated (about 300-500 left).
Are there limits in querystring length?
what else should i try??

any help appreciated

Nov 12 '05 #2
Marcin wrote:
i want to pass XML data in querystring from one to another asp page.
it is about 10000 characters long, i cannot use FORM because it is
already nested in one.
Forget about that. URLs are not meant (read "specified") to transport
such payload. Any upstream HTTP processor may simply truncate the URL.
What i do is i have IFRAME and im passing some xml data
in QUERYSTRING. It doesnt work somehow, im using javascript escape
method to substitute escape characters, but most of characters are
being truncated (about 300-500 left).
Are there limits in querystring length?
Yes. There's no specified maximum length, but experience shows that
query strings longer than 2 kB are to avoided.
what else should i try??


HTTP POST.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Kim Lots | last post: by
1 post views Thread by Consuelo Guenther | last post: by
3 posts views Thread by Lee | last post: by
reply views Thread by Laura K | last post: by
3 posts views Thread by Tor Inge Rislaa | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.