-
String to HtmlDocument
public System.Windows.Forms.HtmlDocument GetHtmlDocument(string html) { WebBrowser browser = new WebBrowser(); browser.ScriptErrorsSuppressed = true; browser.DocumentText = html; browser.Document.OpenNew(true); browser.Document.Write(html); browser.Refresh(); return browser.Document; }
-
HtmlDocument document = ATL.Frm_Dll.Lib.WebDom.GetHtmlDocument(res); HtmlElement e = document.All["registerForm"]; HtmlElementCollection elements = e.GetElementsByTagName("input"); foreach (HtmlElement element in elements) { if (element.GetAttribute("type") == type) { e = element; } }