Hi, there seems to be a limit on the number of items a dropdown list can have of about 500. A normal dropdown list does not seem to have this limit. When I try to a cascading dropdown list, I get a "Webmethod Error: 500" as the only item in the dropdown
list...
I've got the control working, however, I've found that if the datasource (webservice) returns a list greater than about 512 items, the control errors out... This looks like a limitation somewhere.
This limitation is most likely being made by the default setting of maxJsonLength in your web.config. You can specify the size like this in web.config:
thoga01
0 Points
2 Posts
Cascading Dropdownlist Item Count Limit
Apr 16, 2007 12:45 PM|LINK
Hi, there seems to be a limit on the number of items a dropdown list can have of about 500. A normal dropdown list does not seem to have this limit. When I try to a cascading dropdown list, I get a "Webmethod Error: 500" as the only item in the dropdown list...
Regards
Garry
e_screw
All-Star
19530 Points
3894 Posts
Re: Cascading Dropdownlist Item Count Limit
Apr 16, 2007 02:34 PM|LINK
Here is a walkthrough with source-code for the same: http://aspalliance.com/1183
Thanks
Electronic Screw
Website||Blog||Dub@i.net
thoga01
0 Points
2 Posts
Re: Cascading Dropdownlist Item Count Limit
Apr 16, 2007 10:46 PM|LINK
I've got the control working, however, I've found that if the datasource (webservice) returns a list greater than about 512 items, the control errors out... This looks like a limitation somewhere.
Thanks
beeno
Member
12 Points
6 Posts
Re: Cascading Dropdownlist Item Count Limit
Apr 14, 2009 05:38 PM|LINK
This limitation is most likely being made by the default setting of maxJsonLength in your web.config. You can specify the size like this in web.config:
<system.web.extensions> <scripting> <webServices> <jsonSerialization maxJsonLength="1234567"></jsonSerialization> </webServices> </scripting> </system.web.extensions>Bear in mind that the size is characters, not record count. The default setting is 102400."AJAX Toolkit" "CascadingDropDown" "DropDownList" "Ajax Control Toolkit"
Beeno
chetan.sarod...
All-Star
65839 Points
11163 Posts
Re: Cascading Dropdownlist Item Count Limit
Apr 15, 2009 03:17 AM|LINK
Error 500 is a generic catch-all server error that say "hey, something went wrong and I can't fulfill your request." You can examine your server log files to find out the exact cause of the error. This is a server error so it really can't be prevented in your code, but it can be handled. Read http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys.WebForms/Exceptions/PageRequestManagerServerErrorException.aspx for an explanation of ways to handle the error.
You can do something like this to improve the user's experience when that occurs: http://encosia.com/2007/07/18/how-to-improve-aspnet-ajax-error-handling/
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/CascadingDropDown/CascadingDropDown
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
conradob
Member
2 Points
1 Post
Re: Cascading Dropdownlist Item Count Limit
Jun 29, 2012 03:33 PM|LINK
beeno
Works for me ! Thanks !