如何调用在更新面板FN在asp.net部分回发一个javascript [英] how to call a javascript fn in Update panel on Partial postback in asp.net

查看:94
本文介绍了如何调用在更新面板FN在asp.net部分回发一个javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

       <asp:UpdatePanel runat="server" ID="Holder" OnLoad="" UpdateMode="Always" ChildrenAsTriggers="True">
                <ContentTemplate>
...
                   <asp:Timer ID="Timer1" runat="server" Interval="3000" OnTick="Timer_Tick" />
            </ContentTemplate>
        </asp:UpdatePanel>

JS:

window.onload = function () {
          r.init();
        };

当页面加载r.init()[绘制图表]

被执行。但是,当部分页面后回发生在图不是重画。如何火JS时更新面板isFinite的更新

when the page loads the r.init() [to draw graph] is executed. But when the page partial post back happens the graph is not drawn again. How to fire the JS when the update panel isFinite updated

推荐答案

您会希望这些事件上载面板将前和部分回发后调用响应。

You'll want to respond to these events that the upload panel will invoke before and after a partial postback.

Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(...);
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(...);

这篇关于如何调用在更新面板FN在asp.net部分回发一个javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆