protected void BindImageCategories() { BPImageCategories bp = new BPImageCategories(); DSImageCategories = bp.SelectAllActive(); DSImageCategories.tbl_ImageCategories.DefaultView.Sort = "ImageCategoryName"; ddlImageCategories.DataBind(); ddlImageCategories.Items.Insert(0, new ListItem("(All Categories)", "-1")); ddlImageCategories.Items.Insert(1, new ListItem("Not Assigned", "0")); }
private void BindImageCategories() { BPImageCategories bp = new BPImageCategories(); BEImageCategories DSImageCategories = bp.SelectAllActive(); DSImageCategories.tbl_ImageCategories.DefaultView.Sort = "ImageCategoryName"; ddlImageCategory.DataSource = DSImageCategories.tbl_ImageCategories; ddlImageCategory.DataMember = "tbl_ImageCategories"; ddlImageCategory.DataTextField = "ImageCategoryName"; ddlImageCategory.DataValueField = "ImageCategoryID"; ddlImageCategory.DataBind(); ddlImageCategory.Items.Insert(0, new ListItem("Select a Image Category", "0")); }