Jeppe:
First, I'd like to thank you for posting the video,obviously took away any
ambiguity of what your problem was. Adds a bit of spice to the day to day
helping ;)
That said, I'm not sure what to tell you other than, that's just how it
works :(
You are binding your 2nd result to the SelectedValue of your checkboxlist
control. SelectedValue returns only the first value selected - that's it's
documented behaviour and that's what you are seeing.
What you can do is create your own server control which inherits from
CheckBoxList, and in it add a single property, AllSelectedValues which would
do what you want, perhaps something like:
public class EnhancedCheckboxList : CheckBoxList
{
public string AllSelectedValues
{
get
{
base.EnsureChildControls();
StringBuilder sb = new StringBuilder();
foreach(ListItem item in base.Items)
{
if (item.Selected)
{
sb.Append(item.Value);
sb.Append(",");
}
}
//trim trailing comma here, too lazy to do it myself
return sb.ToString();
}
}
}
This would return a comma-sepearted list, which you might be able to use in
an IN statement, not sure.
I'm just going off the top of my head, and this might not work at all, but
thought it might provide some help.
As a solution, you could avoid using the SqlDataSource, which promotes bad
design anyways :)
Karl
--
http://www.openmymind.net/
"Jeppe Jespersen" <jdj curly jdj dot dk> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Checkout a little 3-minuter video i made, illustrating my problem.
http://www.netkoder.dk/cl/
Any ideas?
Jeppe