Response.Redirect

  • Thread starter Thread starter Martyn Fewtrell
  • Start date Start date
M

Martyn Fewtrell

Hi there

I am developing an ASP.Net form which submits to a non ASP.net script (not
through choice!).

Basically the form collates a whole bunch of data and builds a query string
from the collected form fields. The query string is then appended on to the
Url of the script and is sent using the Response.Redirect option. e.g.
Response.Redirect(myquerystring)

The problem is that the query string can typically be 2500 characters long
and this doesn't appear to work (although it did work when the query string
contained less fields). The bit that is puzzling is that if I output the
query string onto the page using a literal (instead of sending it to the
script), copy the query string into the browser address bar (via notepad)
and send it, it works just fine?

Anybody aware of any limitations with Response.Redirect with respect to the
length of the Url or any better ways of getting the server to send the data
to the script?

Thanks

Martyn Fewtrell
(e-mail address removed)
 
That's interesting as I couldn't find anything useful on the web at all!

As the Url string works when pasted into the IE6 address bar I wonder
whether the functionality of Response.Redirect is taken from a chunk of code
from IE5.5 which would possibly explain the behaviour.

Martyn Fewtrell
 
Martyn said:
That's interesting as I couldn't find anything useful on the web at
all!

As the Url string works when pasted into the IE6 address bar I wonder
whether the functionality of Response.Redirect is taken from a chunk
of code from IE5.5 which would possibly explain the behaviour.

There's no specified maximum URL length. Many implementations use ~
2kB. Using large querystrings is therefore pretty dangerous.

Cheers,
 
Back
Top