Thursday, April 14, 2011

How to display messagebox in asp.net 3.5?

There are many ways to show or display message. I have two ways:
First way is this,
ScriptManager.RegisterStartupScript(this, this.GetType(), "onclick", "alert('" + message + "');", true); 
Second way is this,
String scriptString = "<script language=JavaScript>";
scriptString += "alert('" + message + "')";
scriptString += "</script>";
this.ClientScript.RegisterStartupScript(this.GetType(), "onlick", scriptString);
Hope my blog helps you.

No comments:

Post a Comment