Posted on: 12/30/2013 7:00:52 PM | Views : 1015

I am trying to display error message from webmethod but not working
code
[WebMethod] public static void UpdateRPM (string p08, string p09, string p10, string p11, string p12, string lastdate, string note, string f01, string f02,string f03, string abccode) { if (verify_Date(lastdate) == true) {
} else { string script = "<script type=\"text/javascript\">alert('Nota a valid date');</script>"; ; Page page = HttpContext.Current.CurrentHandler as Page; // System.Web.HttpContext.Current.Response.Write("<SCRIPT LANGUAGE='JavaScript'>alert('Not a valid date.')</SCRIPT>"); page.ClientScript.RegisterClientScriptBlock(page.GetType(), "alert", script, true); }
}

Go to the complete details ...