添加下拉"请选择"
 并实现添加下拉选择项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(0, new ListItem("—请选择—", ""));
13 }
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(0, new ListItem("—请选择—", ""));
13 }
                    
                
                
            
        
浙公网安备 33010602011771号