tks

博客园 首页 联系 订阅 管理

首先,将GridView1的AllowPaging属性设为true
然后,添加以下分页代码:
protected void BindData()
    
{        
                GridView1.DataSource 
= udb.GetVIPUserInfo().Tables[0];
                GridView1.DataBind();
                  
    }

protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    
{
        
this.GridView1.PageIndex = e.NewPageIndex;
        BindData();
    }
posted on 2007-04-03 16:35  特困生  阅读(732)  评论(0)    收藏  举报