Thursday, May 31, 2007

javascript alert from UpdatePanel

ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "clientScript", "alert('Record Successfully Saved')", true);

The last true is to add javascript tags

3 comments:

Unknown said...

Is this supposed to work ? not workinf for me..

Renato said...

It is working! Thank you!

Chooch said...

It works just fine, you have to remember that if you're using VB instead of C# use "me" instead of "this"

ScriptManager.RegisterStartupScript(Me, Me.GetType, "key123", "alert(""WRAR"");", True)