public ActionResult GetDDL(string id) { try { var data = CustomModel.GetSubCategoryForDDL(string.IsNullOrEmpty(id)?0:Convert.ToInt32(id)); return(Json(new { success = true, data = data })); } catch (Exception e) { return(Json(new { success = false, message = e.Message })); } finally { } }