On Wed, 06 Jun 2007 12:08:43 -0700, Brett Wesoloski <br*********@pai.com>
wrote:
What I mean by current value is the check box you just checked.
Okay. I'll suggest that's not a broadly used concept of "current value".
:)
[...]
Now I select the b check box. The current value is b. Then I go and
select
the f check box. The current value is f as that was the next check box
to
be selected.
Does that help?
Sure. What you actually want is the checkbox that actually has *focus*.
That's entirely different from the one(s) that is(are) selected.
Not having done the ASP/web .NET stuff, I'm not sure how you can actually
get that. My first thought would be that you could enumerate the ListItem
instances in the CheckboxList and check to see which one (if any) has the
focus. But I don't see any immediate way to do that in the ListItem class.
If it's possible, it probably has something to do with the larger browser
container somehow, since in the context of a web page, focus can actually
leave the web page, and so I would not expect it to necessarily be tracked
by the web page itself. But I admit, never had to do any of the web UI
stuff, so I don't know for sure one way or the other.
As a last resort, it may be that you can track when any of the items in
the CheckboxList change, and by doing so, keep track of the one that most
recently changed. Then consider that the one with "focus" any time you
care about that.
Hopefully knowing that you are actually asking about "focus" rather than
"selection", that may help you in your search through the documentation.
Pete