ListBox - Can't get SelectedIndex

  • Thread starter Thread starter doug.dossett
  • Start date Start date
D

doug.dossett

Hello,

I have a listbox, where upon clicking a button I want to edit the page
associated with the item selected from the list box. I have it check
for listboxname.SelectedIndex > -1 for which it keeps coming back false
even though I have selected something in the list. This used to work
on this page, but I can't find what I did to break it. Is there some
common cause that would keep the selectedindex from being set? I've
run into this before, but can't remember how I solved the problem.

Thanks for any help.

Regards,

Doug Dossett
 
Yes, that was one of my first thoughts, didn't seem to make a
difference.

Thanks,

Doug
 
are you databinding the list? that could be the reason for losing the
viewstate info.
 
Yes, but not on postback. It used to work this way, so I don't think
that has anything to do with it. Thanks for your ideas!
 
you r welcome. sorry that I already ran out of ideas ;-). hope you find the
solution.
alejandro.
 
Back
Top