Tuesday, December 9, 2008

ASP.NET: UpdatePanel and popup with javascript

Problem

How to open popup-window with javascript when there is a UpdatePanel control in the page

Solution

You must use ScriptManager.RegisterStartupScript() instead of ClientScript.RegisterStartupScript(). That's because ScriptManager enables partial page update what AJAX needs but ClientScript doesn't enable partial page updates.

2 comments:

  1. Just what I needed. This works. Thanks!

    ReplyDelete
  2. in this link you will find an example, I've tested and works correctly, I hope they serve:

    http://www.systemdeveloper.info/2014/02/how-do-i-add-javascript-updatepanel-in.html

    They can also look at this other link,

    http://www.systemdeveloper.info/2014/01/fileupload-control-in-update-panel.html

    ReplyDelete