Jim,
Perhaps this one works better.
string SessDate = this.listBox1.SelectedItem.ToString();
HTH
>I'm developing a Windows Forms application that includes a ListBox control.
>
>I have created a handler for the Click event.
>
>But, I am not able to get the value of the SelectedItem. Here is the offending line:
>
>string SessDate = (string)(listBox1.SelectedItem);
>
>I get an error message saying "Unable to cast object of type 'System.Data.DataRowView' to type 'System.String'.
>
>When I run under the debugger, I can see this.ListBox and that shows {SelectedItem = "10/25/2002"} which is what I am trying to get.
>
>Help!
>
>Thanks,
>Jim
robert.oh.