08-01-2013, 01:19 PM
i usually use this (vb.net)
Dim searchString As String = TextBox4.Text
Dim index As Integer = UserList.FindString(searchString)
If string.contains = true then, else error.
If index <> -1 Then
UserList.SetSelected(index, True)
Else
MsgBox("Not Found")
End If
may be in c# can be like :
string searchString = TextBox4.Text;
int index = UserList.FindString(searchString);
// If string.contains = true then, else error.
if (index != -1) {
UserList.SetSelected(index, true);
} else {
Interaction.MsgBox("Not Found");
}

