zoukankan      html  css  js  c++  java
  • asp.net ajax 分页等待效果

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
    <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        Namespace="System.Web.UI" TagPrefix="asp" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <script runat="server">
        protected void GridView1_PageIndexChanged(object sender, EventArgs e)
        {
            //延迟3秒显示
            System.Threading.Thread.Sleep(3000);
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>My First AJAX Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                   <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        DataKeyNames="username" DataSourceID="SqlDataSource1"  OnPageIndexChanged="GridView1_PageIndexChanged" AllowSorting="True" ForeColor="#333333" GridLines="None" >
                       <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:BoundField DataField="username" HeaderText="username" ReadOnly="True" SortExpression="username" />
                            <asp:BoundField DataField="Subcompany" HeaderText="Subcompany" SortExpression="Subcompany" />
                        </Columns>
                       <PagerStyle BorderColor="#FFC080" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:EHRConnectionString %>"
                        SelectCommand="SELECT [username], [Subcompany] FROM [STAFF] ORDER BY [id]">
                    </asp:SqlDataSource>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                <ProgressTemplate>
                   <img src="images/loading.gif" /><div style="background-color:Red;color:#fff;64px">Loading...</div>
                </ProgressTemplate>
            </asp:UpdateProgress>
        </form>
    </body>
    </html>

    噢耶游戏是中国最大的轻社交游戏开发商,致力于手机页游的研发及推广业务。我们首创性地提出了HTML5游戏中心思路,在第三方App 中嵌入式休闲游戏,为开发者提供了全新的应用内游戏解决方案。
  • 相关阅读:
    spring boot + activeMq 邮件服务
    spring boot集成activeMQ
    Java做爬虫也很方便
    Go语言学习03
    MongoDB学习-->Gridfs分布式存储&DBRef关联查询
    tomcat与oracle关于8080端口的冲突
    端口号的查找处理方法
    很不错的在线Office控件:IWebOffice与SOAOffice
    SOAOffice和iWebOffice、NTKO的比较及其优势(转)
    Cannot get a connection, pool exhausted解决办法
  • 原文地址:https://www.cnblogs.com/yintian2/p/767989.html
Copyright © 2011-2022 走看看