后台
关键字:
<%--
npageindexchanging="GridViewSearchResult_PageIndexChanging" >
<%--
<%--
前台
List
protected void Page_Load(object sender, EventArgs e)
{
//加载CSS样式表
WebLoader.LoadCSS(this, "BasicStyle.css");
WebLoader.LoadCSS(this, "Search.aspx.css");
field.Add("User_Status");
field.Add("User_Email");
field.Add("User_State");
field.Add("User_RealName");
field.Add("User_Point");
if (!Page.IsPostBack)
{
this.Bind(); //调用上面的BindToGridView()绑定
}
}
protected void Bind()
{
IUserBLL userBLL = BLLFactory.CreateUserBLL();
IList
this.GridViewSearchResult.DataSource = result;
this.GridViewSearchResult.DataBind();
}
protected void btnSearch_Click(object sender, EventArgs e)
{
Bind();
}
protected void GridViewSearchResult_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridViewSearchResult.PageIndex = e.NewPageIndex;
this.Bind(); //调用上面的BindToGridView()绑定
}