private void Bind2() { CategoryId.DataSource = bllut.GetList(""); CategoryId.DataTextField = "typename"; CategoryId.DataValueField = "typeid"; CategoryId.DataBind(); }
private void BindCategoryId() { CategoryId.DataSource = bllmt.GetAllList(); CategoryId.DataTextField = "TypeName"; CategoryId.DataValueField = "MtID"; CategoryId.DataBind(); CategoryId.Items.Insert(0, new ListItem("请选择", "0")); }
public void BindDropDown() { BABrand objProduct = new BABrand(); DataTable dt = new DataTable(); dt = objProduct.BAGetCategory(); BrandId.Items.Insert(0, new ListItem("--Select Brand--", "0")); CategoryId.DataSource = dt; CategoryId.DataTextField = "CategoryName"; CategoryId.DataValueField = "CategoryId"; CategoryId.DataBind(); CategoryId.Items.Insert(0, new ListItem("--Select Category--", "0")); }