Z
zdrakec
Hello all:
I have two listboxes on a webform, the user selects items from the
first (which is, naturally, multi-select), and clicks a button that
will copy the selected items into the second box. The code to achieve
this is simple: I iterate through the first listbox' items collection,
and if listbox.item(x).selected is true -
if listbox1.item(x).selected then
listbox2.items.add(listbox1.item(x).text)
end if
Very straightforward. My problem is that some of my selections are
getting lost. For example, if I select the first, say, eight items in
listbox1, when the click event fires (actually, when the page load is
called again), only the first four or five items in the list will still
have selected = true, which I discovered by putting a "stop" command at
the top of page_load and walking through the list in the immediate
window.
Can someone explicate this for me? I am most definitely only populating
(or otherwise touching) listbox1 only if page.ispostback = false.
Thanks much,
zdrakec
I have two listboxes on a webform, the user selects items from the
first (which is, naturally, multi-select), and clicks a button that
will copy the selected items into the second box. The code to achieve
this is simple: I iterate through the first listbox' items collection,
and if listbox.item(x).selected is true -
if listbox1.item(x).selected then
listbox2.items.add(listbox1.item(x).text)
end if
Very straightforward. My problem is that some of my selections are
getting lost. For example, if I select the first, say, eight items in
listbox1, when the click event fires (actually, when the page load is
called again), only the first four or five items in the list will still
have selected = true, which I discovered by putting a "stop" command at
the top of page_load and walking through the list in the immediate
window.
Can someone explicate this for me? I am most definitely only populating
(or otherwise touching) listbox1 only if page.ispostback = false.
Thanks much,
zdrakec