protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataList1.DataSource = data.GetDataReader("select top 4 * from shangping order by shangpingid desc "); DataList1.DataBind(); Datalist2.DataSource = data.GetDataReader(" select top 4 shangpingid,shangpingname,chushouprice,pic from shangping where fenleiid = 3 order by shangpingid desc "); Datalist2.DataBind(); Datalist3.DataSource = data.GetDataReader(" select top 4 shangpingid,shangpingname,chushouprice,pic from shangping where fenleiid = 4 order by shangpingid desc "); Datalist3.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { Page.Title = "Tin tuc online | tin tuc 24h | tin moi nhat"; if (!IsPostBack) { Page.Title = "Tin tuc online | tin tuc 24h | tin moi nhat"; Page.MetaDescription = ""; Page.MetaKeywords = ""; Datalist1.DataSource = data.GetAllBaiVietLimitOffSet(1, 0); Datalist1.DataBind(); Datalist2.DataSource = data.GetAllBaiVietLimitOffSet(6, 1); Datalist2.DataBind(); dataCongnghe1.DataSource = data.GetAllBaiVietLimitOffSet(1, 0); dataCongnghe1.DataBind(); dataCongnghe2.DataSource = data.GetAllBaiVietLimitOffSet(3, 1); dataCongnghe2.DataBind(); // dataANXH1.DataSource = data.GetBaiVietTheoChuyenMucLimitOffset(9, 1, 0); dataANXH1.DataBind(); dataANXH2.DataSource = data.GetBaiVietTheoChuyenMucLimitOffset(9, 3, 0); dataANXH2.DataBind(); // dataBongda1.DataSource = data.GetBaiVietTheoChuyenMucLimitOffset(5, 1, 0); dataBongda1.DataBind(); dataBongda2.DataSource = data.GetBaiVietTheoChuyenMucLimitOffset(5, 3, 0); dataBongda2.DataBind(); // dataTG.DataSource = data.GetBaiVietTheoChuyenMucLimitOffset(1, 3, 0); dataTG.DataBind(); // dataDulich1.DataSource = data.GetBaiVietTheoChuyenMucLimitOffset(10, 1, 0); dataDulich1.DataBind(); dataDulich2.DataSource = data.GetBaiVietTheoChuyenMucLimitOffset(10, 3, 0); dataDulich2.DataBind(); } }