Hi
I have an issue with a list box. I populate the list box using
When i go to retrieve the selected item from the listbox using
an error is generated
cannot cast expression type system.web.ui.w ebcontrols.list item to type car
i have read several tutorials and many of them use the above code.
Any ideas on how i can return the object from the listbox
Cheers
Truez
I have an issue with a list box. I populate the list box using
Code:
listbox1.datasource = myCollectionOfCars listbox1.databind()
Code:
Car myCar = (Car)listbox1.selecteditem;
cannot cast expression type system.web.ui.w ebcontrols.list item to type car
i have read several tutorials and many of them use the above code.
Any ideas on how i can return the object from the listbox
Cheers
Truez
Comment