Thanks Svetlin,
That option worked. I checked and found am not assigning any data in value
for the items. Assigning unique values there corrected the problem.
Thanks once again.
Samir
"Svetlin Grancharov" <> wrote in message
news:046701c35b9d$af2ef870$...
> Hi Samir,
> why don't you use values with these list items.
> Check SelectedValue and SelectedItem properties.
>
> Svetlin Grancharov
> >-----Original Message-----
> >Hi All,
> >
> >Am facing a problem with listbox control in asp.net. If
> the listbox has
> >entries which are duplicate in text value, selection of
> an entry down the
> >list causes the selectedindex property to return the
> least index containing
> >the same text even though that is not selected.
> >
> >To elaborate:
> >
> >if my list box contains elements in following sequence
> >a
> >b
> >c
> >a
> >d
> >
> >on selection of the 2nd "a" the selectedindex contains
> value 0 instead of 3.
> >
> >Has anyone faced this problem earlier? Is there any
> setting I could be
> >missing?
> >
> >Thanks in advance for any help offered. A quick reply
> would be really
> >appreciated as this is causing a stand still in
> development.
> >
> >Regards
> >Samir
> >
> >
> >.
> >
|