protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { YMC.BLL.News news = new YMC.BLL.News(); news.LoadAll(); news.Query.Top = 5; uiRepeaterNews.DataSource = news.DefaultView; uiRepeaterNews.DataBind(); } }
private void BindData() { News objData = new News(); objData.LoadAll(); uiGridViewNews.DataSource = objData.DefaultView; uiGridViewNews.DataBind(); }