ASP.NET 2.0 CheckboxList Question - VS 2005 RC1

C

Curt tabor

I am using a checkbox list populated from a dataset table. The list has
about 24 items. In the SelectedIndexChanged event, the SelectedIndex of
the checkbox list always returns the lowest selected index of the list
instead of what I clicked on.


So if item 3 is checked and I check on item 10, the selected index of
the control is always 3. How can I get the index of what was selected?
The eventArgs is empty.


Can anyone help me please?


Curt
 
C

Curt tabor

No, I load it in the page load but only if it's not a postback. Even
the online help says that SelectedIndex returns the lowest selected
index but in thier SelectedIndexChanged sample code, they use
SelectedIndex which will only retururn them the lowest selected item
index so thier own sample code looks like it will do what I;m seeing.
It would be nice if I could find out which checkbox was clicked. Do you
know how to do that?

Thanks for answering,

Curt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top