[WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService] public class ReceiptService : System.Web.Services.WebService { public ReceiptService () { //Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod] public CascadingDropDownNameValue[] GetSchoolName(string knownCategoryValues, string category) { dsScoolTableAdapters.school_detailTableAdapter school_detailAdapter = new dsScoolTableAdapters.school_detailTableAdapter(); dsScool.school_detailDataTable schools = school_detailAdapter.GetSchoolName(); List<CascadingDropDownNameValue> values = new List<CascadingDropDownNameValue>(); foreach (DataRow dr in schools) { string school_name = (string)dr["school_name"]; string district = (string)dr["district"]; values.Add(new CascadingDropDownNameValue(school_name, school_name.ToString())); } return values.ToArray(); } }
[System.Web.Script.Services.ScriptService]
maxJsonLength
<system.web.extensions> <scripting> <webServices> <jsonSerialization maxJsonLength="5000000" /> </webServices> </scripting> </system.web.extensions>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)