前台:
<select id="ddlAddedItemType" runat="server"> <option value="">请选择</option> </select>
后台:
public void ddlItemTypeBind() { DataSet dsaddeditemtype = addeditemtypeBLL.GetList(""); this.ddlAddedItemType.DataSource = dsaddeditemtype; this.ddlAddedItemType.DataTextField = "ItemTypeName"; this.ddlAddedItemType.DataValueField = "ID"; this.ddlAddedItemType.DataBind(); this.ddlAddedItemType.Items.Insert(0,new ListItem("请选择","")); //自定义一个值 }
时间: 2024-10-10 04:20:08