【发布时间】:2012-02-13 08:11:52
【问题描述】:
DropDownList2 循环将数据绑定到 DropDownList3,但如果我使用 DropDownList2 选择不同的值,则会出现错误“:DataBinding:'System.String'不包含名为'ALL'的属性。”。
DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList3.DataSource = null;
DropDownList3.DataBind();
DropDownList3.Items.Clear();
//generic list
listDropDown3.Clear();
listDropDown3.Add("ALL");
DropDownList3.DataSource = listDropDown3;
DropDownList3.DataBind(); **** <<<=== pukes on DataBind() during second iteration:
" DataBinding: 'System.String' does not contain a property with the name 'ALL'."
}
请帮忙,这让我发疯了。
【问题讨论】:
标签: c# asp.net drop-down-menu data-binding unbind