Mike

Mike

  • NA
  • 6
  • 0

Retrieving text from selected item in a listbox VB.NET

Jun 18 2010 1:18 PM

I am having trouble retreiving the actual text from the selected item in a listbox.    The listbox only allows one selected item at a time. 
I have tried this: Me.lblCurrentDoorTag.Text = (Me.lstDoorTags.Items(pIntIndexOfSelectedItem).ToString), but it returns ColdGuard_Design_Automation_System.ClassDoorTag

also tried this: me.lblCurrentDoorTag.Text = (Me.lstDoorTags.Text)
Sometime it works but other times it also returns ColdGuard_Design_Automation_System.ClassDoorTag

 

I have wasted a lot of time trying to find a solution to this problem.    What am I doing wrong?


Answers (4)