No way. It's much longer than 255 characters, and that was also the case in classic ASP. I don't even think it's a server side problem, but a browser restriction. Here's a simple test.
Create two pages, QueryString1.asp and QueryString2.asp. In the first, add the following code that creates a string of 2000 characters, appends it to an URL as a QueryString and then redirects to that:
Code:
<%
Dim queryString
Dim loopCount
For loopCount = 1 To 2000
queryString = queryString & Right(CStr(loopCount), 1)
Next
Response.Redirect("QueryString2.asp?QUERY=" & queryString)
%>
On QueryString2.asp add code that writes out the QueryString and its length:
Code:
<%
Response.Write("The QueryString is " & _
Request.QueryString & "<br />")
Response.Write("It has a length of " & _
Len(Request.QueryString) & "<br />")
%>
When you open QueryString1.asp in your browser, you'll see it successfully redirects to QueryString2.asp where it displays the QueryString and a length of 2006 (QUERY= is counted as well).
In Internet Explorer, I can loop up to 2034 so the entire QueryString is 2040 characters. After that, the code stops working.
However, other browsers have different limitations. In FireFox 0.X I can successfully pass QueryStrings of 6000 characters and more (haven't tested the upper limit yet).
The same is True for Opera 7 (5 and 6 show the correct length, but no longer display the QueryString), Netscape (4, 6 and 7) and Mozilla.
So since Internet Explorer 6 is one of the most used browsers, it's recommended to keep the length of the QueryString under 2000 characters.
Hope this clarifies the QueryString myth a little bit.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to:
Creamer (Radio Is Dead) by
Limp Bizkit (Track 13 from the album:
Results May Vary)
What's This?