G
Guest
I need to read the contents of a dropdown listbox up to a space and then eliminate everything to the right of the space(including the space). How do I do this
Thanks
Dave
Thanks
Dave
eliminate everything to the right of the space(including the space). How doDave Bailey said:I need to read the contents of a dropdown listbox up to a space and then
eliminate everything to the right of the space(including the space). How doDave Bailey said:I need to read the contents of a dropdown listbox up to a space and then
Dave Bailey said:I need to read the contents of a dropdown listbox up to a space and
then eliminate everything to the right of the space(including the
space). How do I do this?
Dave Bailey said:Thanks for all the help. I am using the following code:
private string GetSystemCode()
{
string code = sysCodeList.SelectedItem.ToString();
int offset = code.IndexOf(' ');
if (systemCodeCheck.Checked == true)
{
return " and wo3 = '" + ((offset == -1)? code: code.Substring(0,
offset)) + "'";
}
else
{
return null;
}
}
Thuis code is part of a select statement which is the where clause.
It appears that this code does not trim the drop down list box to the
information that is on the left side of the first space.
Any suggestions?