Simple question regarding postback and viewstate

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

I have created a web form with 3 different inputs, 1 drop
down and 2 list boxes. The drop down selection populates
the two list boxes, and I can get this render once, no
problem, I now want to change the contents, of either
list box based upon multiple selections in the list
boxes. In short I want to re-render the list box's
contents, based on the list box choices, UNFORTUNATELY,
it seems to only appned new choices, and not re-write the
result set as desired. Any body have any idea?

thanks

dave
 
More simply put.

Is there a way to reset the following:

ListBox.Items.Add(memberfirst[h]);

I have tried

ListBox.Items.Insert(h,memberfirst[h]);

and puts the new entries at the beginning, and won't get
rid of the old entries.


Is there a way to reset ListBox.Items, each time the
button is clicked?
 
Hi Dave

How are you adding the items to the listbox. are you doing databinding??? because if you are doing databinding then i guess you can rebind the datasource and that should work

Let me know how you are adding the items..

Regards
Madh

MVP | MCSD.NE

----- dave wrote: ----

I have created a web form with 3 different inputs, 1 drop
down and 2 list boxes. The drop down selection populates
the two list boxes, and I can get this render once, no
problem, I now want to change the contents, of either
list box based upon multiple selections in the list
boxes. In short I want to re-render the list box's
contents, based on the list box choices, UNFORTUNATELY,
it seems to only appned new choices, and not re-write the
result set as desired. Any body have any idea

thank

dav
 
Back
Top