0
我有一個簡單的結構,看起來像一個.NET 4.0的Web應用程序: RootMaster(帶的ScriptManager)> ShipmentMaster> ContentPage>的UpdatePanelASP.NET的UpdatePanel打破當ScriptManager的是母版頁
UpdatePanel的是最近添加以通過部分頁面更新來減少頁面閃爍。它不工作。相反,完整的回發/更新正在發生。
我建立這個問題的兩個縮小版本,一個(練習1)模仿上面的結構,以及一個(練習2),看起來像: ContentPage(帶的ScriptManager)>的UpdatePanel
這似乎關於原始(和Ex1)的Master/ScriptManager安排的事情正在破壞事情,但我不知道是什麼。
任何想法?
下面是相關(我想,糾正我,如果錯了)的練習1代碼:
Root.master,
<body>
<form id="pageForm" runat="server">
<asp:ScriptManager ID="SiteScriptManager"
runat="server"
AjaxFrameworkMode="Enabled"
EnablePartialRendering="True"
LoadScriptsBeforeUI="true"
ScriptMode="Release"
onasyncpostbackerror="SiteScriptManager_AsyncPostBackError" >
<Scripts>
<asp:ScriptReference Path="~/Scripts/jquery-1.7.1.min.js" />
<asp:ScriptReference Path="~/Scripts/jquery-ui-1.8.18.custom.min.js" />
<asp:ScriptReference Path="~/Scripts/jquery.tools.min.js" />
<asp:ScriptReference Path="~/Scripts/json2.js" />
<asp:ScriptReference Path="~/Scripts/modernizr.custom.js" />
<asp:ScriptReference Path="~/Scripts/PFF.js" />
</Scripts>
</asp:ScriptManager>
...
</form>
</body>
</html>
WebForm1.aspx的,
<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Root.master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Pasha.OTTS.Web.FamiliesFirst.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="RootHeadContentPlaceholder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="RootBodyContentPlaceholder" runat="server">
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="dpShipments" />
</Triggers>
<ContentTemplate>
<asp:DataPager ID="dpShipments" runat="server" PagedControlID="lvShipments" PageSize="3" onprerender="dpShipments_PreRender">
<Fields>
<asp:NextPreviousPagerField />
<asp:NumericPagerField />
</Fields>
</asp:DataPager>
<asp:ListView ID="lvShipments" runat="server" onpagepropertieschanging="lvShipments_PagePropertiesChanging">
<LayoutTemplate>
<div class="table-wrapper">
<table class="results">
<tr>
<th>A</th>
<th>B</th>
</tr>
<tr id="itemPlaceholder" runat="server"></tr>
</table>
</div>
</LayoutTemplate>
<ItemTemplate>
<tr>
<td ><%#Eval("A")%></td>
<td ><%#Eval("B")%></td>
</tr>
</ItemTemplate>
</asp:ListView>
<asp:Button ID="Button1" runat="server" Text="Button" />
<p>Async: <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</p>
</ContentTemplate>
</asp:UpdatePanel>