Parse A Html Combox In C# November 26, 2023 Post a Comment I need parse a select value in html file. I have this html file: Solution 1: You can do it with the HtmlAgilityPack. There are many examples of using it to parsing html. You can find via a google search. Here are a few:http://htmlagilitypack.codeplex.com/wikipage?title=Examples&referringTitle=HomeHow to use HTML Agility packUPDATE:While I think using the library is a better choice, you can do it with the webbrowser control in the following manner: webBrowser1.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(ParseOptions); webBrowser1.Url = new Uri("C:\\1.html", UriKind.Absolute); privatevoidParseOptions(object sender, WebBrowserDocumentCompletedEventArgs e) { HtmlElement elems = webBrowser1.Document.GetElementById("region"); } CopyNotice that the parsing is done in the DocumentCompleted event handler.Solution 2: Html Agility Pack is a HTML parser great parser. Share Post a Comment for "Parse A Html Combox In C#"
Post a Comment for "Parse A Html Combox In C#"