Posts Tagged ‘alert message’

Javascript Alert Message

Wednesday, March 19th, 2008

How to show javascript alert message from code behind? You probably know, we can do it like this:
ClientScript.RegisterStartupScript(Page, “message”, “alert(’Hellow world!’);”, true).

However this method is not going to work in AJAX environment. For AJAX you need to use: ScriptManager.RegisterStartupScript.

Here is a little utility method, which displays javascript alert message both in AJAX environment and on regular page:
(more…)