Hello ,
there are two methods for searching the text or value in dropdown.
one is
FindByText
and another one is
FindByValue
syntax is
drpdown.Items.FindByText(string text);
or
drpdown.Items.FindByValue(string value);
and then put it in the condition
if (drpcategory.Items.Contains(drpcategory.Items.FindByText("search text")))
{
}
thanks