Problme in JsonResult

Posted by Saravanan I M on Stack Overflow See other posts from Stack Overflow or by Saravanan I M
Published on 2010-05-26T03:05:01Z Indexed on 2010/05/26 3:11 UTC
Read the original article Hit count: 565

Filed under:
|
|

I am using the jasonresult for listing all the cities under a country. I retrieve the data from database and load it to a dropdown list using jquery. The problem is if the cities goes beyond 3000 then the jasonresult is not working.

$(document).ready(function () { //Hook onto the MakeID list's onchange event $("#Country").change(function () { //build the request url $("#HomeTown").empty(); var url = '' + "Location/GetCitiesByCountry/" + $("#Country").val(); $.getJSON(url, function (data) { $.each(data, function (index, optionData) { $("#HomeTown").append("" + optionData.asciiname + ""); }); $("#HomeTown").option[0].selected = true; }); }).change(); });

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about jQuery