gpt4 book ai didi

c# - ScriptManagerProxy、UpdatePanel 和纯 JS

转载 作者:行者123 更新时间:2023-12-02 20:28:00 25 4
gpt4 key购买 nike

<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
</asp:ScriptManagerProxy>
<asp:UpdatePanel ID="upSchedule" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<script type="text/javascript">
function afterRender(data) {
// code
}
</script>
<div style="margin-bottom:5px">
Izberi:&nbsp;
<a href="javascript:dpc1.commandCallBack('previous');">Predhodnji teden</a> -
<a href="javascript:dpc1.commandCallBack('next');">Naslednji teden</a> -
<a href="javascript:dpc1.commandCallBack('today');">Danes</a> -
<a href="javascript:dpc1.commandCallBack('week');">Začetek tedna</a>
</div>
<br />
<table style="width:100%">
<tr>
<td valign="top" style="width:150px">
<DayPilot:DayPilotNavigator ID="dpnOrders" runat="server"
BoundDayPilotID="dpcOrders"

由于 DayPilotPro,我需要在 UpdatePanel 内调用纯 JS,但是当我使用 UpdatePanel 时,这是不可能的。我该如何调用它?

最佳答案

是的,这会起作用。但请确保脚本位于 ScriptManager 下方。

   Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler); 
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
//Before callback event handler
function BeginRequestHandler(sender, args) {

}
//After callback event handler
function EndRequestHandler(sender, args) {

}

关于c# - ScriptManagerProxy、UpdatePanel 和纯 JS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4543793/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com