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.

Advertisements
This entry was posted in ASP.NET 3.5, ASP.NEt And C# 3.5 And Javascript, C# 3.5, JavaScript. Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s