开发者

asp.net: RegisterStartupScript from ScriptManagerProxy, possible?

开发者 https://www.devze.com 2022-12-08 15:48 出处:网络
I need to run some javascript after an update panel updates, this update panel is in a Usercontrol located in a page that has a MasterPage. The MasterPage has a ScriptManager and the Usercontrol has a

I need to run some javascript after an update panel updates, this update panel is in a Usercontrol located in a page that has a MasterPage. The MasterPage has a ScriptManager and the Usercontrol has a ScriptManagerProxy.

in the UserControl I am calling:

ScriptManagerProxyControl.Page.RegisterStartupScript(Guid.开发者_如何学JAVANewGuid().ToString(), "alert('hello');");

but nothing is happening.

All the exmaples I see use ScriptManager, but this is not available as its on the master page.

Any ideas?


I found this codeproject article that solves my problem.

http://www.codeproject.com/KB/ajax/hourglassajax.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消