我都发过一次了,没能达到解决,希望大侠们能给点详细的,不要随便扔个地址我都不知道是什么,谢谢

解决方案 »

  1.   

    功能就是能google的数字分页一样,只是不刷新,因为我的一个页面有好几个分页所以要做到无刷新的效果
      

  2.   

    updateplane ajax  局部刷新
      

  3.   

    曾经有个aspnetpager叫嚣的挺牛的,不过没用过,它貌似可以满足你要求,也容易上手
    肯琢磨就用jquery,有很多分页组件
      

  4.   

    要分页的话 用 aspNetPage啊  蛮好用的 还可以自己写样式 定义之类的  
      

  5.   

    这样啊,你把要分页的东西先扔AJAX的无刷面板updateplane 中,再用分页类或者写个top 10之类的分页语句应该能行吧,我记得以前就是那样做的//总页数
        int pageAll = 0;
        //总记录数
        int countAll = 0;    //加载事件
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ViewState["page"] = 1;
                GetCount(1);
            }
        }    //绑定控件
        private void GetCount(int pageIndex)
        {
            CountAll();
            this.lblCount.Text = "共有 " + countAll + " 条记录 | 当前 " + pageIndex + "/" + pageAll + " 页";
            this.GridView1.DataSource = LoginLogManager.FindAll(pageIndex);
            this.GridView1.DataBind();
        }    //计算总页数
        private void CountAll()
        {
            countAll = LoginLogManager.CountALL();
            if (countAll % 10 == 0)
            {
                pageAll = countAll / 10;
            }
            else
            {
                pageAll = (countAll / 10) + 1;
            }
        }//首页
        protected void imgFrist_Click(object sender, ImageClickEventArgs e)
        {
            GetCount(1);
            Index = 1;
        }
        //上页
        protected void imgPre_Click(object sender, ImageClickEventArgs e)
        {
            
            if (Index >1)
            {
                Index--;
                GetCount(Index);
            }
            else
            { 
                GetCount(1);
            }
        }
        //下一页
        protected void imgNext_Click(object sender, ImageClickEventArgs e)
        {
            CountAll();
            if (Index < pageAll)
            {
                Index++;
                GetCount(Index);
            }
            else
            {            GetCount(pageAll);
            }
        }    //末页
        protected void imgEnd_Click(object sender, ImageClickEventArgs e)
        {
            CountAll();
            GetCount(pageAll);
            Index = pageAll;
        }    private int index;    public int Index
        {
            get { return (int)ViewState["page"]; }
            set { ViewState["page"] = value; }
        }刚学的时候写的代码太粗糙了大概就那样的,这事top 每页数据数 做的,没有分页类简单,你看看有帮助么
      

  6.   

    http://topic.csdn.net/u/20101115/15/40c9be9b-a04a-49d8-a65e-a1d8e3043325.html
    加updatepanel 局部刷新
      

  7.   

    异步的导航、添加、修改、删除数据界面(用listView + LinqDataSource)<asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:ListView runat="server" ID="LimingchStudio_ListView" DataKeyNames="ItemID" 
                    InsertItemPosition="LastItem" DataSourceID="ObjectDataSource1" 
               >
                <LayoutTemplate>
                <table id="Table2" runat="server" style=" border:solid thick blue;">
                <tr runat="server" id="itemPlaceholder"></tr>
                </table>
                </LayoutTemplate>
                <ItemTemplate>
                <tr>
                <td ><input name="Item"  type="checkbox" value='<%# Eval("ItemID")%>'/></td>
                <td><%# Eval("Title").ToString().Length>16?Eval("Title").ToString().Substring(0,5)+"......":Eval("Title")%></td>
                <td><%#Eval("Begin")%></td><td><%#Eval("Deadline") %></td>
                <td><%#Eval("Originalprice") %></td><td ><%#Eval("Currentprice") %></td><td><%#Eval("Supplier")%></td>
                <td><%#Eval("Address")%></td></tr> 
                <tr><td colspan="3" style=" border-bottom-width:medium; border-bottom-style:ridge"></td>
                <asp:Button ID="btnEdit" Text="编辑" runat="server" CommandName="Edit"></asp:Button>
                <asp:Button ID="btnDelete" Text="删除" runat="server" CommandName="Delete" OnClientClick="return confirm('您确认要删除此条数据信息吗?')"></asp:Button>
                </tr>
                </ItemTemplate>
                <EditItemTemplate>
                <td><input name="Item"  type="checkbox" value='<%# Eval("ItemID")%>'/></td>
                <td><%# Eval("Title").ToString().Length>16?Eval("Title").ToString().Substring(0,5)+"......":Eval("Title")%></td>
                <td><%#Eval("Begin")%></td><td><%#Eval("Deadline") %></td>
                <td><%#Eval("Originalprice") %></td><td ><%#Eval("Currentprice") %></td><td><%#Eval("Supplier")%></td>
                <td><%#Eval("Address")%></td></tr> 
                <tr ><td colspan="3" style=" border-bottom-width:medium; border-bottom-style:ridge;">
                <asp:LinkButton runat="server" ID="btnIpdate" Text="更新" CommandName="Update"></asp:LinkButton>
                <asp:LinkButton runat="server" Text="取消" CommandName="Cancel"></asp:LinkButton></td></tr>
                </EditItemTemplate>
                <InsertItemTemplate>
               <td><input name="Item"  type="checkbox" value='<%# Eval("ItemID")%>'/></td>
                <td><%# Eval("Title").ToString().Length>16?Eval("Title").ToString().Substring(0,5)+"......":Eval("Title")%></td>
                <td><%#Eval("Begin")%></td><td><%#Eval("Deadline") %></td>
                <td><%#Eval("Originalprice") %></td><td ><%#Eval("Currentprice") %></td><td><%#Eval("Supplier")%></td>
                <td><%#Eval("Address")%></td></tr> 
                </InsertItemTemplate>
                </asp:ListView>
                <asp:LinqDataSource ID="LinqDataSource_LimingchStudio" runat="server" ContextTypeName="chtNortwindDataContext"
                 TableName="iyaobao" EnableDelete="true" EnableInsert="true" EnableUpdate="true"></asp:LinqDataSource>
                <asp:DataPager runat="server" ID="DataPager1" PageSize="6" PagedControlID="LimingchStudio_ListView">
                <Fields>
                <asp:TemplatePagerField>
                <PagerTemplate>
                <hr />
                <b>
                页码
                <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.TotalRowCount>0 ?(Container.StartRowIndex / Container.PageSize)
                 +1 : 0 %>" /> / <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Math.Ceiling(System.Convert.ToDouble(Container.TotalRowCount) / Container.PageSize) %>" />
                 ( <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.TotalRowCount %>" />条数据)
                 <br />
                </b>
                </PagerTemplate>
                </asp:TemplatePagerField>
                <asp:NextPreviousPagerField  ButtonType="Link" ShowFirstPageButton="true" ShowPreviousPageButton="true"
                 ShowNextPageButton="true" ShowLastPageButton="true" FirstPageText="第一页" PreviousPageText="上一页"
                  NextPageText="下一页"  LastPageText="最后一页"/>
                </Fields>
                </asp:DataPager>
               <br />
               <asp:Label ID="lblMessage" runat="server" Text="" Font-Italic="true" ForeColor="#FF3300"></asp:Label>
                </ContentTemplate>
            </asp:UpdatePanel>后台的部分代码
      //错误提示
            protected void LimingchStudio_ListView_ItemDeleted(object sender,ListViewDeletedEventArgs e) 
            {
                if (e.Exception != null)
                {
                    e.ExceptionHandled = true;
                    this.lblMessage.Text = "数据无法删除,错误提示如下:" + Environment.NewLine + e.Exception.Message;
                }
                else 
                {
                    this.lblMessage.Text = "信息删除成功";
                }
            }
            protected void LimingchStudio_ListView_ItemInserted(object sender,ListViewInsertedEventArgs e) 
            {
                if (e.Exception != null)
                {
                    e.ExceptionHandled = true;
                    this.lblMessage.Text = "数据无法添加,错误信息如下:" + Environment.NewLine + e.Exception.Message;
                }
                else 
                {
                    this.lblMessage.Text = "信息添加成功";
                }
            }
        }
      

  8.   

    去你 下个ajax 无刷新分页 例子看下撒
      

  9.   

    http://aspnetpager.51aspx.com/updatepanel/default.aspx
      

  10.   

    用 aspnetpager 控件分页  再拖个 微软的 scriptmanager  和 updatepanel 就可以