problem with return a value from a list box
hi
How can return a value from a listbox that connected to a database.I used this code : "countrylistbox.items(2).toString " but the return value is this:"system.data.datarowview" .but if it doesn't connect to a database it works.
i'm usign vb.net 2005
thanks
Re: problem with return a value from a list box
Hi,
Is the list box showing the data correctly? or Are you facing some problem with Returning values?
Since you are binding it to database, you should use SelectedValue/SelectedItem property for returning the values from listbox.
If you are not binding it to db, your code will work.
Try like countrylistbox.SelectedItem.
Thanks.