SqlConnection con = new SqlConnection("server=904-8D01759C2C0//SQLEXPRESS;database=Study_NET;uid=sa;pwd=sasa");
SqlConnection con = DB.createCon();
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select top 6 * from product", con);
DataSet ds = new DataSet();
sda.Fill(ds);
this.Repeater1.DataSource = ds;
this.Repeater1.DataBind();
con.Close();
SqlConnection con = new SqlConnection("server=904-8D01759C2C0//SQLEXPRESS;database=Study_NET;uid=sa;pwd=sasa");
SqlConnection con = DB.createCon();
con.Open();
SqlDataAdapter sda = new SqlDataAdapter("select * from product", con);
DataSet ds = new DataSet();
sda.Fill(ds, "temptable");
PagedDataSource pds = new PagedDataSource();
pds.DataSource = ds.Tables["temptable"].DefaultView;或者pds.DataSource = ds;