private void LoadDDls() { DBLayer db = new DBLayer(); uiDropDownListCats.DataSource = db.GetAllCats(); uiDropDownListCats.DataTextField = "CategoryName"; uiDropDownListCats.DataValueField = "ID"; uiDropDownListCats.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { DBLayer db = new DBLayer(); uiRepeaterCats.DataSource = db.GetAllCats(); uiRepeaterCats.DataBind(); uiRepeaterGallery.DataSource = db.GetAllProducts(); uiRepeaterGallery.DataBind(); }
private void LoadDDLs() { DBLayer db = new DBLayer(); uiDropDownListCats.DataSource = db.GetAllCats(); uiDropDownListCats.DataTextField = "CategoryName"; uiDropDownListCats.DataValueField = "ID"; uiDropDownListCats.DataBind(); uiDropDownListCats.Items.Insert(0, new ListItem("Choose Category", "0")); }
private void BindData() { DBLayer db = new DBLayer(); DataSet ds = new DataSet(); ds = db.GetAllCats(); uiGridViewCats.DataSource = ds; uiGridViewCats.DataBind(); }