protected void Page_Load(object sender, EventArgs e) { DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetAllNews(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { uiLiteralTicker.Text += ds.Tables[0].Rows[i]["arContent"].ToString() + " | "; } uiLiteralTicker.Text = uiLiteralTicker.Text.Remove(uiLiteralTicker.Text.LastIndexOf("|")); }
private void BindData() { DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetAllNews(); uiGridViewNews.DataSource = ds; uiGridViewNews.DataBind(); }