news.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class news : System.Web.UI.Page
{
DataPage dp = new DataPage();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bind();
}
}
/// <summary>
/// 绑定
/// </summary>
private void bind()
{
string where = " 1=1 ";
int recordcount;
int pagesize = this.AspNetPager1.PageSize;
int pageindex = this.AspNetPager1.CurrentPageIndex;
this.Repeater1.DataSource = dp.pagelist(pagesize, pageindex, "news", " * ", "nid", where, "atime desc", out recordcount);
this.Repeater1.DataBind();
this.AspNetPager1.RecordCount = recordcount;
}
/// <summary>
/// 分页
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
bind();
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。