我需要用List<ListItem>中收集的项填充它。但是我不能填充DropDownList。我收到一个错误:
DataBinding: 'System.Web.UI.WebControls.ListItem' does not contain a property with the nameDropDownList ID="uxListUsers" runat="server" DataTextField=&
我在ASP.NET web forms DropDownList中遇到了这种意外的行为。我正在将ListItems添加到下拉列表中,一切看起来都很好。除了从未设置过ddl中的值(在我的示例中是Id)之外,它将被ListItem中的文本替换。(new ListItem(item.name, item.id.ToString()));
//in the drop down list the <e