标签:style io color os sp on cti bs ef
初始化的时候:
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();
}
标签:style io color os sp on cti bs ef
原文地址:http://www.cnblogs.com/WZH75171992/p/4126491.html