protected JsonResult JsonError(string message, Dictionary <string, string> htmlForIds) { var jsonResultObject = new JsonResultObject { success = false, message = message, htmlForIds = htmlForIds }; return(Json(jsonResultObject, JsonRequestBehavior.AllowGet)); }
/// <summary> /// The action is successful and we need to reload the page. /// </summary> /// <returns></returns> protected JsonResult JsonSuccess(string message, bool reload) { var jsonResultObject = new JsonResultObject { success = true, message = message, reload = reload }; return(Json(jsonResultObject, JsonRequestBehavior.AllowGet)); }
/// <summary> /// The action is successful and we need to redirect to a specified url. /// </summary> /// <returns></returns> //protected JsonResult JsonSuccess(string message, string redirect) //{ // var jsonResultObject = new JsonResultObject { success = true, message = message, redirect = redirect }; // return Json(jsonResultObject, JsonRequestBehavior.AllowGet); //} protected JsonResult JsonError(string message, object data = null) { var jsonResultObject = new JsonResultObject { success = false, message = message, data = data }; return(Json(jsonResultObject, JsonRequestBehavior.AllowGet)); }
protected JsonResult JsonError(string message, string redirect) { var jsonResultObject = new JsonResultObject { success = false, message = message, redirect = redirect }; return(Json(jsonResultObject, JsonRequestBehavior.AllowGet)); }