{ string entry = Titleentry.Text; HtmlElementCollection theElementCollection; HtmlDocument filters = webBrowser1.Document; theElementCollection = webBrowser1.Document.GetElementsByTagName("input"); foreach (HtmlElement curElement in theElementCollection) { if ((curElement.GetAttribute("id").ToString() == "searchTitle")) { curElement.SetAttribute("value", entry); } } filters.GetElementById("filterSortBy").GetAttribute("option").Select("price_low_high"); //foreach (HtmlElement curElement in option) //{ // if option = ("price_low_high"); //} theElementCollection = webBrowser1.Document.GetElementsByTagName("button"); foreach (HtmlElement curElement in theElementCollection) { if (curElement.GetAttribute("id").Equals("searchSubmit")) { curElement.InvokeMember("click"); } }
<select name="searchSortBy" id="filterSortBy"> <option value="popularity" label="Most popular" selected="selected">Most popular</option> <option value="price_low_high" label="Price, low to high">Price, low to high</option> <option value="price_high_low" label="Price, high to low">Price, high to low</option> </select>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)