/// <summary> /// /// </summary> /// <param name="status"></param> /// <param name="message"></param> /// <param name="details"></param> /// <returns></returns> public static JsonResult JsonResponse(string message, string details = "", AjaxResponseStatus status = AjaxResponseStatus.Warning, string html = "", string redirectUrl = "") { return(new JsonResult { Data = AjaxResponse.GetResponse(message, details, status, html = html, redirectUrl = redirectUrl), ContentType = "application/json", JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
/// <summary> /// /// </summary> /// <param name="status"></param> /// <param name="message"></param> /// <param name="details"></param> /// <returns></returns> public static AjaxResponse GetResponse(string message, string details = "", AjaxResponseStatus status = AjaxResponseStatus.Warning, string html = "", string redirectUrl = "") { return(new AjaxResponse { Status = status, Message = message, Details = details, Html = html, RedirectUrl = redirectUrl }); }