I want Index of drop down list item. I have item in string variable and passing in IndexOf method but it gives me error. I did it as follows.

string val = "abc";
int index1 = ddl2.Items.IndexOf(val);

It gives as invalid argument. Please Help. Thanks.

Related posts

Recent Viewed