Parse A HTML Combox In C# May 09, 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=Home How to use HTML Agility pack UPDATE: 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); private void ParseOptions(object sender, WebBrowserDocumentCompletedEventArgs e) { HtmlElement elems = webBrowser1.Document.GetElementById("region"); } Copy Notice 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#"