How to use Javascript alert inside AJAX UpdatePanel

Java Script to show Messagebox from Codebehind, This code will not work when same is used with Updatepanel postback.

Page. ClientScript.RegisterStartupScript(this.GetType(), "winPop", "alert('Update is successful')

So in order to add javascript in update panel you need to register you client script to your script manager as shown below:

ScriptManager.RegisterClientScriptBlock(Page, Page.GetType(), Guid.NewGuid().ToString(), "alert('Update is successful.');",True)

Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms - Change Colour of Navigation Bar (Page Title For Master-Detail Template)

Xamarin Forms : PopUp Page with RG.Plugins.Popup