

InterviewSolution
1. |
Solve : Visual Basic problem? |
Answer» Hi, I'm using visual BASIC with .net framework 4, and I made a program that gets the strings from a table in a database and shows them in a listbox, the listbox shows the elements correctly, but when i try to set a variable with the index string (Label1.Text = listbox1.selecteditem() ) I get System.Data.DataRow or something like that, i want to get the string. Can someone help me? Label1.Text = ListBox1.SelectedItem().ToString() not working You'll need to get the field from the DataRow, then. Code: [SELECT]ListBox1.SelectedItem("fieldname").ToString()It works fine, thank you for helping me. Solved. |
|