Thursday, March 22, 2012

ASP.NET/C# - Display client-side message box from code-behind


We can use the Script Manager in C# in order to fire JavaScript alert on ASP.NET page:

ScriptManager.RegisterStartupScript(this, this.GetType(), "msg", "alert(This is my client-side message triggered from code-behind in C#');", true);

No comments:

Post a Comment