Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [WebMethod]
- public static JsonResult GetMaintZone(string ddlState)
- {
- DataTable dt = new DataTable();
- try
- {
- CommonDB ObjCommon = new CommonDB();
- dt = ObjCommon.GetMZONE(ddlState);
- }
- catch (Exception)
- {
- throw;
- }
- return JsonResult(dt);
- }
- function getMZONEWithState(evt) {
- var ddlState = $('#ContentPlaceHolder1_ddlState').val();
- var ddlMaintenanceZone = $("#ddlMaintenanceZone");
- ddlMaintenanceZone.empty().append('<option selected="selected" value="0" disabled = "disabled">State Loading...</option>');
- $.ajax({
- type: "POST",
- url: "Dashboard.aspx/GetMaintZone",
- data: JSON.stringify({ ddlState: ddlState }),
- contentType: "application/json; charset=utf-8",
- dataType: "json",
- success: function (response) {
- //fill ddl
- },
- error: function (response) {
- alert('Something went wrong..!!');
- }
- });
- }
Add Comment
Please, Sign In to add comment