Tuesday, April 1, 2014

Javascript Alert in C#

1) Response.Write("<script>alert('Either User Name Or Password Is Wrong')</script>");

2) Page.ClientScript.RegisterStartupScript(this.GetType(), "ErrorMessage", "Notification('" + ex.Message + "')", true);

3) ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "Myscript", "alert('Course have Subjects under it, can not change name');", true);

No comments:

Post a Comment