私はddlModalityListドロップダウンリストを持っています..ddlModalityListの選択に..私は別のドロップダウンリストにそれぞれの選択された研究を投入する必要があります。
protected void Page_Load(object sender, EventArgs e)
{
var dictionery = new Dictionary<int, string>();
foreach (DataRow dr in dataTableAcqModality.Rows)
{
ModalityID = Convert.ToInt32(dr["Modality_ID"]);
strModality = dr["Modality"].ToString();
strSchStaAETitle = dr["Scheduled_Station_AE_Title"].ToString();
strSchStaName = dr["SCHEDULED_STATION_NAME"].ToString();
strDdlModality = strModality + "(" + strSchStaAETitle + "|" + strSchStaName + ")";
dictionery.Add(ModalityID, strDdlModality);
}
ddlModalityList.DataTextField = "Value";
ddlModalityList.DataValueField = "Key";
ddlModalityList.DataSource = dictionery;
ddlModalityList.DataBind();
}
protected void ddlModalityList_SelectedIndexChanged(object sender, EventArgs e)
{
Dictionary<int, string> selectedPair = (Dictionary<int,string>)ddlModalityList.SelectedItem;
}
}