ASPNETPAGE怎么让repaeter分页
后台publicpartialclasswelcome:System.Web.UI.Page{SQLDBsqldb=newSQLDB();protectedvoidPag...
后台
public partial class welcome : System.Web.UI.Page
{
SQLDB sqldb = new SQLDB();
protected void Page_Load(object sender, EventArgs e)
{
QueryList();
this.TextBox1.Text = Request["name"];
Bianliang = this.TextBox1.Text.ToString();
}
private void QueryList()//绑定数据
{
string sql = "select * from newslist";
DataSet ds = sqldb.GetAll(sql);
this.Repeater1.DataSource = ds.Tables[0];
this.Repeater1.DataBind();
}
前台除了控件要设置还要加什么吗?
可以的话加下企鹅 385919097 展开
public partial class welcome : System.Web.UI.Page
{
SQLDB sqldb = new SQLDB();
protected void Page_Load(object sender, EventArgs e)
{
QueryList();
this.TextBox1.Text = Request["name"];
Bianliang = this.TextBox1.Text.ToString();
}
private void QueryList()//绑定数据
{
string sql = "select * from newslist";
DataSet ds = sqldb.GetAll(sql);
this.Repeater1.DataSource = ds.Tables[0];
this.Repeater1.DataBind();
}
前台除了控件要设置还要加什么吗?
可以的话加下企鹅 385919097 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询