我正在尝试使用 linq 在字典中搜索值
HiddenField hf_resID = (HiddenField)e.Item.FindControl("hf_resID");
int resID = Convert.ToInt32(hf_resID.Value);
////get GroupID
var value = from di in Resources_and_Groups
where (di.Key.ToString() == resID.ToString())
select di.Value;
//get controller from Repeater
DropDownList ddlGroup = (DropDownList)e.Item.FindControl("ddlGroup");
//ddlGroup.SelectedValue = value.ToString();