in an usercontrol with update panel when using the scriptManger to register a script this code is works:
ScriptManager.RegisterStartupScript
(this.updatePanel, this.updatePanel.GetType(), "printing", Keys.URL, true);
but this one does not work
ScriptManager.RegisterStartupScript(this, this.GetType(), "printing", Keys.URL, true);
i cant figure why?
I would think it’s because in the first example you’re registering a script for the
UpdatePanel(which would be updated on an asynchronous postback – enabling the script to be written), whereas in the second example you’re doing it at thepagelevel, which wouldn’t be updated as it falls outside theUpdatePanel.