DTCMS 新建下拉列表控件

初始化的时候:

ddlpmzcName.DataSource = new DTcms.BLL.auction().GetpmzcName();
ddlpmzcName.DataTextField = "title";
ddlpmzcName.DataValueField = "id";
ddlpmzcName.DataBind();

注:ddlpmzcName是控件的ID

修改初始化的时候的绑定是:

     BLL.production bll = new BLL.production();
            Model.production model = bll.GetModel(_id);
            ddlCategoryId.SelectedValue = model.category_id.ToString();

      ddlpmzcName.DataSource = new DTcms.BLL.auction().GetpmzcName();
            ddlpmzcName.DataTextField = "title";
            ddlpmzcName.DataValueField = "id";
            ddlpmzcName.DataBind();
            if (!string.IsNullOrEmpty(model.pmzc))
            {
                ddlpmzcName.SelectedValue = model.pmzc.ToString();
            }

  

上一篇:python的正则表达式 re


下一篇:读取Devexpress内部的图标