开发者

Client script for displaying an alert is not working if I use the AsyncPostBackTrigger

I have a masterpage in my application. I'm using timer control based on the timer interval the page gets refreshed. And I don't want the whole page to get r开发者_Python百科efreshed. So I'm using AsyncPostBackTrigger on the tick event of the timer. I want to display an alert/modal dialog box whenever it is triggered. I have written a client script for displaying alert/modal dialog box. The client script is not working if I use the AsyncPostBackTrigger. If I remove the trigger, then the whole page is getting refreshed. Is there any way that I can find a solution? Please help.


Try this:

var prm = Sys.WebForms.PageRequestManager.get_instance();
prm.add_endRequest(function() {
   //put code here
});

http://www.asp.net/ajaxlibrary/Reference.Sys-WebForms-PageRequestManager-endRequest-Event.ashx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜