关于asp.net代码小问题
求助一下代码是啥意思:public void Band()
{
string type = ext_string(Request.QueryString["ID"]);
try
{
this.lbClassName.Text = db1.GetModel(type).ClassName;
}
catch
{
this.lbClassName.Text = "新闻中心";
}
DataSet ds = new DataSet();
string sqlwhere = " 1=1 ";
sqlwhere += type != "" ? " and ClassID='" + type + "'" : "";
ds = db.GetList(sqlwhere);
AspNetPager1.RecordCount = ds.Tables.Count;
PagedDataSource pdsList = new PagedDataSource();
pdsList.DataSource = ds.Tables[0].DefaultView;
pdsList.AllowPaging = true;
pdsList.PageSize = AspNetPager1.PageSize;
pdsList.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
this.replist.DataSource = pdsList;
this.replist.DataBind();
}
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
Band();
}
protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
{
AspNetPager1.CurrentPageIndex = e.NewPageIndex;
}
}