Saturday, May 19, 2007

Adding Removing Items from ListBox

I this simple sample code, I 've two Listboxes which in the Left Side there is a list of cars, and you can add/remove Item from/to the RightListbox.

I 'm holding all cars, and selected cars in session two keep over post backs.
If you want to enable multi select on the sample put

SelectionMode="multiple"

for the listboxes.

You can download the code here:
http://www.tabatabaei.info/csharpsamples/AddRemoveItems.zip

2 comments:

Hamid Torabzadeh said...

Hi my dear teacher
I'm Hamid Torabzadeh .
If you remember last summer, when you absent in the first section of your new term in Arina institute,(for your accident ;) ) , i was in that class ...
in that calss -> me , Mrs. M Tofighi , Mrs. B Khadem , Mrs. Y Dianatbeyk and Mr H Ardakani.
can you remember me ? ;)

Ok, anyway , so nice to meet you again in this weblog...
I hope in this location , i can take new and more knowledge around C#.NET form (specially)you and other dear friends in this weblog
Really i so glad for correlation with together again..
Have a good time and success for you.
HTorabzadeh@Gmail.com
86/02/30

Anonymous said...

salam ba ostad
kare khili khobi kardin ke dobare shore beneveshtan kardin
sai mikonam az weblogeton estefade konam
movafagh bashin