S
Seb
As of now I use the code below...
var queryPoints = from ad in this.db.ActivityDatas
where ad.SubActivityId ==
int.Parse(SubActivityId.SelectedItem.Value) //only one selected
activity
select new
{
...
...
However only one selection form the listbox is used in the where
clause.
I have tried with the following and several others... however I cant
seem to find they right syntax
SubActivityId.Items.Cast<ListItem>().Contains(new ListItem() { Text =
ad.SubActivity.Name, Value = ad.SubActivityId.ToString() })
and
SubActivityId.Items.Cast<ListItem>().Contains(SubActivityId)
And numerous others...
it's the items with SubActivityId.Items[x].Selected == true I want to
compare SubActivityId.Items[x].Value with ad.SubActivityId on. Hope I
make sense...
best regards
var queryPoints = from ad in this.db.ActivityDatas
where ad.SubActivityId ==
int.Parse(SubActivityId.SelectedItem.Value) //only one selected
activity
select new
{
...
...
However only one selection form the listbox is used in the where
clause.
I have tried with the following and several others... however I cant
seem to find they right syntax
SubActivityId.Items.Cast<ListItem>().Contains(new ListItem() { Text =
ad.SubActivity.Name, Value = ad.SubActivityId.ToString() })
and
SubActivityId.Items.Cast<ListItem>().Contains(SubActivityId)
And numerous others...
it's the items with SubActivityId.Items[x].Selected == true I want to
compare SubActivityId.Items[x].Value with ad.SubActivityId on. Hope I
make sense...
best regards