|
-
Mar 15th, 2008, 04:37 AM
#1
Thread Starter
Member
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
-
Mar 15th, 2008, 05:50 AM
#2
Junior Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|