Last post Nov 06, 2017 05:13 AM by Chait
Nov 05, 2017 04:23 PM|Chait|LINK
Am developing a web application where in search page I have 5 checked list boxes. When user selects multiple check boxes from these list boxes and clicks on search button. The result is displayed in Grid view with link button. When user clicks on link button
of any item, then page is navigated to item details page and this entire search criteria(selected values in list boxes) is stored in query string. In details page I read this query string and fill other details. This works fine for most of the items.
But when user selects 'ALL' items in this list boxes, all the texts in the list boxes are added to query string and it gets larger than 2100 characters. At this time application returns ' file not found' error.
I need the selected check boxes items in search criteria in the details page.
Can you please suggest a better way for doing this ?
Nov 05, 2017 04:28 PM|A2H|LINK
Can you please suggest a better way for doing this
An Easy solution is to use session and it will be like this
//Set the value of Textbox to session
Session["Data"] = YourcheckboxlistSeletedItems;
//Perform your Redirect
You can read values from session like given below
//Read values from session
string valueA = Session["Data"].ToString();
Nov 06, 2017 01:11 AM|Deepak Panchal|LINK
there is no any maximum limit mentioned for the query String.
but there is a limit of length of URL in browser.
every browser has different limit of characters it can handle .
Microsoft states that the maximum length of a URL in Internet Explorer is 2,083 characters, with no more than 2,048 characters in the path portion of the
URL. In my tests, attempts to use URLs longer than this produced a clear error message in Internet Explorer.
After 65,536 characters, the location bar no longer displays the URL in Windows Firefox 1.5.x. However, longer URLs will work. I stopped testing after 100,000 characters.
At least 80,000 characters will work. I stopped testing after 80,000 characters.
At least 190,000 characters will work. I stopped testing after 190,000 characters. Opera 9 for Windows continued to display a fully editable, copyable and pasteable URL in the location bar even at 190,000 characters.
My early attempts to measure the maximum URL length in web browsers bumped into a server URL length limit of approximately 4,000 characters, after which Apache produces a "413 Entity Too Large" error. I used the current up to date Apache build found in Red
Hat Enterprise Linux 4. The official Apache documentation only mentions an 8,192-byte limit on an individual field in a request.
What is the maximum possible length of a query string?
What is the maximum length of a URL?
and generally it returns error below.
but I can see that you are getting " file not found" error.
are you trying to open any file in your code?
you did not posted the code so we are not sure about it.
if you are opening any file then try to post your code.
it will help us to find the issue in your code.
Nov 06, 2017 05:13 AM|Chait|LINK
Thanks for the reply.
Am not trying to open any file just navigating to page and displaying the values based on the query string. Until the query string length is 2106 characters page is displayed perfectly. For the example at one scenario the length of query string is 4101 characters.
The error message is
"404-File or directory not found