0
Я пытаюсь реализовать foreach
цикл для каждого выбранного элемента в нескольких ListBox UserProfileTrainingSearch
:Реализация цикла для каждого выбранного элемента в нескольких ListBox
if (UserProfileTrainingSearch.SelectedValue != "-1" && //other conditions)
{
foreach (var ListBoxItem in UserProfileTrainingSearch.SelectedValue) // only the first item selected is giving the results.
{
Session["UserbyTrainingType"] = "SELECT DISTINCT USERPROFILE.USER_ISN, USERPROFILE.LAST_NAME + ',' ..........................;
SqlUserProfile.SelectCommand = (string)Session["UserbyTrainingType"];
}
}