Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / April 2005

Tip: Looking for answers? Try searching our database.

passing XML querystring

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marcin - 27 Apr 2005 06:24 GMT
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
Dennis Myrén - 27 Apr 2005 15:10 GMT
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.
Signature

Regards,
Dennis JD Myrén
Oslo Kodebureau

>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
[quoted text clipped - 7 lines]
>
> any help appreciated
Joerg Jooss - 27 Apr 2005 20:44 GMT
> 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,
Signature

http://www.joergjooss.de
mailto:news-reply@joergjooss.de


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.