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 : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)