Hey Teemu

Z

zdrakec

Hey Teemu:

Can you explain to me why a WebForms ListBox control, with
SelectionMode set to Multiple, would lose some of the selections?

Here's what I mean. If I select, say, the first nine items of my
listbox (populated at page_load time, only if the page is not being
posted back), at post back time, it will consider items 0,1,2 to be
selected, items 3,4 not to be selected, items 5,6 to be selected, and
the rest not selected. This is one example, sometimes the distribution
is different. Since I used the shift key to select the first nine
elements in the list, I expected all items 0 through 8 to have selected
= true, but such is not the case. Sometimes, regardless of how many
items I have selected, it will regard only items 0 through 4 to be
selected, and occasionally if I select only one item, it will consider
that item not to be selected. Again, the list is populated ONLY if
page.IsPostBack = false, in the page_load event handler.

???

Thanks,
zdrakec
 
T

Teemu Keiski

With ASP.NET v1.0/1.1 or ASP.NET v2.0? Based on your description doesn't
seem to happen regularly. Does this occur on every page or just on a certain
one?
 
Z

zdrakec

Hello Teemu:

It's ASP.NET 1.1; I am only doing this on one page, so... just one. But
it happens every time I load the page on postback, with items selected.

I will probably, if I can't figure out why it's happening, delete the
blasted control from the page, and re-add it... just to see what
happens.

Thanks,
zdrakec
 
T

Teemu Keiski

And try the same with other Page, some empty dummy page etc so that you can
ensure it is reproducible and not by some setup on the specific Page.
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top