Getting unhandled exception error from code
when try run code error on "in"
on "foreach (var item2 in listbox1.items) line.
htmlelementcollection elc = this.webbrowser1.document.getelementsbytagname("a"); int q; foreach (htmlelement el in elc) { foreach (var item2 in listbox1.items) { if (item2.tostring() == label2.text) { listbox1.selecteditem = item2.tostring(); q = listbox1.selectedindex; listbox2.selectedindex = q; if (el.innertext == listbox2.selecteditem) { el.invokemember("click"); break; messagebox.show("done"); } } } }
i got work way searching items in listbox.
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment