/// <summary> /// 绑定新闻列表 /// </summary> public void DDLBind() { DDL_Type.DataSource = BLL.NewsManager.DDLBindManager(); DDL_Type.DataTextField = "TypeName"; DDL_Type.DataValueField = "TypeId"; DDL_Type.DataBind(); }
private void Load_DDL_Type() { int iOut = 0; DDL_Type.DataSource = ServiceFactory.GetInstanceProducType().GetAll(out iOut); DDL_Type.DataValueField = "id"; DDL_Type.DataTextField = "name"; DDL_Type.DataBind(); if (DDL_Type.Items.Count > 0) { DDL_Type.SelectedIndex = 0; } }