C# 从ListView中选择对象后,包含DropDowList的UpdatePanel未更新

C# 从ListView中选择对象后,包含DropDowList的UpdatePanel未更新,c#,asp.net,C#,Asp.net,在我单击listview中的某个项目后,我的更新面板似乎没有更新我的表单。当我通过加载方法中的断点时,它似乎正确地输入了所有内容,但 .aspx 我在我的项目中使用了类似的东西,也许有几个对象同时在dropdownlist中被选中?如果是这样的话,试试这样的方法 //Assign the value found to the selectedValue of the ddlConfig this.ddlConfig.SelectedValue = this.ddlConfig.Items.Fi

在我单击listview中的某个项目后,我的更新面板似乎没有更新我的表单。当我通过加载方法中的断点时,它似乎正确地输入了所有内容,但

.aspx


我在我的项目中使用了类似的东西,也许有几个对象同时在dropdownlist中被选中?如果是这样的话,试试这样的方法

//Assign the value found to the selectedValue of the ddlConfig
this.ddlConfig.SelectedValue =  this.ddlConfig.Items.FindByText(Configurations.Find(d => d.ID == ConfigurationID).Name).Value;

感谢复制粘贴,它工作得很好,这可能是因为我使用它的方式绕过了框架方法来选择DropdownList中的项目。
protected void ListView1_SelectedIndexChanged(object sender, EventArgs e)
{
    //get the object
    //...
    //Assign the value to the DropDownList
    this.ddlConfig.Items.FindByText(Configurations.Find(d => d.ID == ConfigurationID).Name).Selected = true;
}
//Assign the value found to the selectedValue of the ddlConfig
this.ddlConfig.SelectedValue =  this.ddlConfig.Items.FindByText(Configurations.Find(d => d.ID == ConfigurationID).Name).Value;