刷新updatepanel后调用javascript事件 [英] calling javascript event after refreshing updatepanel
问题描述
嘿,
我只是想知道在引入更新面板时如何调用java脚本或服务器端代码。
当没有使用Ajax时它工作,因为我在那部分使用ajax我没有得到我想要的输出。
And如果在网格视图中选择了行,则刷新整个页面。还请建议我如何在选择一行时避免刷新整个页面... !!
提前致谢
hey,
I just want to know how to call java script or server side code when an update panel is introduced.
It's working when Ajax is not used as i used ajax in that part i don't get my output as i want.
And if row is selected in grid view the whole page get's refreshed. Please also suggest me how i can avoid refreshing the entire page when a row is selected...!!
Thanks in advance
推荐答案
参考 - ASP.NET - UpdatePanel和JavaScript [ ^ ]。
Refer - ASP.NET - UpdatePanel and JavaScript[^].
是:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
然后:
function endRequestHandler(sender, args)
{
// Do stuff
}
Documentation here and here. Keep in mind that this will fire for every AJAX request on the page.
更多 - [MSDN]在客户端脚本中编写UpdateProgress控件 [ ^ ]。
这篇关于刷新updatepanel后调用javascript事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!