protected void Page_Load(object sender, EventArgs e)
{
string sqlselect = "select count(*) from viw_article_spclassid where pass=1 and Deleted=0 and ClassID=14";
CalssDS = new BaseClass().ReturnDataSet(sqlselect);
if (CalssDS != null && CalssDS.Tables[0].Rows.Count > 0)
{
itemscount = int.Parse(CalssDS.Tables[0].Rows[0][0].ToString());
if (Request.QueryString["page"] == null)
{
lblpages.Text = PageCount.Pagination(itemscount, 5, 1, "default.aspx", "14", "");//总页数 每页条数 当前第几页 返回页 栏目ID 栏目名称
lblcontext.Text = PageCount.settitles("14", 0, 5, 28, "1"); // 栏目ID 当前页数 每页条数 每条字数 是否单独打开
}
else
{
pagenum = int.Parse(Request.QueryString["page"].ToString());
lblpages.Text = PageCount.Pagination(itemscount, 5, pagenum, "default.aspx", "14", "");
lblcontext.Text = PageCount.settitles("14", pagenum - 1, 5, 28, "1");
}
}
else
{
lblpages.Text = "暂无内容!";
lblcontext.Text = "";
}
}