【发布时间】:2017-02-21 17:10:53
【问题描述】:
我正在尝试为多列表框UserProfileTrainingSearch 中的每个选定项目实现foreach 循环:
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"];
}
}
【问题讨论】:
标签: c# sql vb.net loops listbox