//实现分页
AllowPaging="true"
//一页数据10行
PageSize="10"
// 分页时触发的事件
OnPageIndexChanging="gvwDesignationName_PageIndexChanging"
//在服务器事件里
protected void gvwDesignationName_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvwDesignationName.PageIndex=e.newIndex;
bingDesignatioonName();
}
//这里通用显示分页的模板
当前第:
//((GridView)Container.NamingContainer)就是为了得到当前的控件
/asp:Label
页/共:
//得到分页页面的总数
/asp:Label
页
//如果该分页是首分页,那么该连接就不会显示了.同时对应了自带识别的命令参数CommandArgument
Visible=''>首页/asp:LinkButton
CommandName="Page" Visible=''>上一页/asp:LinkButton
//如果该分页是尾页,那么该连接就不会显示了
Visible=''>下一页/asp:LinkButton
Visible=''>尾页/asp:LinkButton
转到第