添加下拉"请选择"

 并实现添加下拉选择项
1  /// <summary>
 2         /// 绑定产品子类别
 3         /// </summary>
 4         private void BindType(string type)
 5         {
 6             DAL.Comm_SysDataDic SysDic = new DAL.Comm_SysDataDic();
 7             DataSet ds = SysDic.GetList(" DicType = '"+type +"'");
 8             ddltype.DataSource = ds.Tables[0].DefaultView; ;
 9             ddltype.DataTextField = "DicContent";
10             ddltype.DataValueField = "DicID";
11             ddltype.DataBind();
12             ddltype.Items.Insert(0new ListItem("—请选择—"""));
13         }
posted @ 2011-12-05 16:26  做最好の自己  阅读(171)  评论(0编辑  收藏  举报