[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public static string InsertRequest(string bid , string cid , int bookqty , string rmk) { try { //here is my insert code and it's working... } catch (Exception ex) { HttpContext.Current.Session["errorMsg"] = ex.Message; HttpContext.Current.Response.Redirect("error.aspx?pagename=" + System.IO.Path.GetFileNameWithoutExtension(HttpContext.Current.Request.PhysicalPath), false); return "fail"; }
HttpContext.Current.Server.Transfer("error.aspx?pagename=" + System.IO.Path.GetFileNameWithoutExtension(HttpContext.Current.Request.PhysicalPath));
HttpContext.Current.Response.Write("<script>"); HttpContext.Current.Response.Write("window.location='error.aspx?p=" + pageName + "'"); HttpContext.Current.Response.Write("</script>");
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)