views:

148

answers:

1

I have an DropDownList bound to an ObjectDataSource. when I select a row in the drop down how do I get the underlying object(not just the value or text properties). I'm trying to add the selected object from the DropDownList to a Listbox's datasource but I don't know how to reference the object picked. The objects aren't backed in a database so they don't really have keys per say. Maybe there's a better way to do this.

+1  A: 

If you are trying to get the actual object (like a list item or data row), you can't after the postback (actually, I don't think you can before the postback either). The values are saved in the selected item property, but the bound object is discarded.

Kevin