|
-
Aug 15th, 2003, 12:15 PM
#1
Thread Starter
Lively Member
This might help someone...
I am new to VB.Net. And for some reason this took me awhile to figure out how to do. I basically have a Listbox being populated by a dataset. Well using the dataview. After it was populated for the selecteditem property of the listbox was something like system.data.datarow
Something Like that.
Here is alittle code to help get the text that is selected in the listbox after populating it with a dataset.
<vbscript>
Dim i As Integer
dim sSelectedText as String
i = lstData.SelectedIndex
sSelectedText = lstData.GetItemText(lstData.SelectedValue)
Call MessageBox.Show(sSelectedText)
</vbscript>
Hope this helps someone. It gave me a headache...but it seems that comes with trying to migrate from vb6 to .net
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
|