这可能是ajax的一个不好的地方。
总是保持页面的滚动条。
但是同时又是ajax的一个优点,当提交事件位于滚动条下方时,并不会因为表单的提交而把滚动条拉到页面的最上方。

解决方案 »

  1.   

      <!-- 注释 -->
            <!-- Timer控件 -->        
            <!-- 通过设置Interval值(毫秒)可以定期的更新页面; 可以配合UpdateMode来禁止某些UpdataPanle不更新. -->      
            <!-- 如果把Timer置于UpdatePanel外面, 可以非异步提交整个页面. -->              
            
            <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    当前时间: <%= DateTime.Now %>
    <asp:Timer ID="Timer1" runat="server" Interval="1000">
    </asp:Timer>
    </ContentTemplate>
    </asp:UpdatePanel>
        <%--<asp:Timer ID="Timer1" runat="server" Interval="1000">
         </asp:Timer>--%>
         <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode=conditional>
    <ContentTemplate>
    当前时间: <%= DateTime.Now %>
    </ContentTemplate>
    </asp:UpdatePanel>--%>