protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { rpCategories.DataSource = data.Cat_SelectAll(); rpCategories.DataBind(); rpBaiQuanTam.DataSource = data.Post_slide(); rpBaiQuanTam.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var Cats = from cats in data.Categories select cats; rpCategories.DataSource = Cats; rpCategories.DataBind(); rpSlideHome.DataSource = data.Post_slide(); rpSlideHome.DataBind(); } }