日期:2014-05-17  浏览次数:20484 次

关于ASP.NET AJAX的问题
我最近刚用.NET AJAX。   为什么局部刷新后还是会走页面.CS文件的page_Load事件?    ajax不是局部刷新吗?

代码:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Always">
        <ContentTemplate>
        <div class="ResultGridView">   
            <asp:GridView runat="server" ID="GridView" style="width:100%; margin:1px;" Height="20" CellPadding="0"
                    CellSpacing="0" AutoGenerateColumns="false" OnRowDataBound="GridView_OnDataBound"
                PageSize="10" CssClass="ResultGridView"  >
                <Columns>
                    <asp:BoundField DataField = "seqID" />
                    <asp:BoundField DataField = "MachineGroup" HeaderText="机器组" />
                    <asp:BoundField DataField = "MachineName" HeaderText="机器名" />
                    <asp:BoundField DataField = "PartID" HeaderText="部材ID" />
                    <asp:BoundField DataField = "PartName" HeaderText="部材名" />
                </Columns>
                <HeaderStyle CssClass="GridView_HeaderStyle" />
                <RowStyle CssClass="GridView_RowStyle" />
            </asp:GridView>
        </div>
        <div runat="server" id="webPage1" style=" display:none">
            <cc1:WebPagingControl ID="WebPagingControl1" runat="server" TargetControlID="GridView" onpagedatabinding="WebPagingControl1_PageDataBinding">
            </cc1:WebPagingControl>
        </div>
        </ContentTemplate>
        </asp:UpdatePanel>