این مثال رو ببینید
WebBrowser w = new WebBrowser();
w.Navigate(String.Empty);
HtmlDocument doc = w.Document;
doc.Write("<html><head></head><body><img id=\"myImage\" src=\"c:\"/><a id=\"myLink\" href=\"myUrl\"/></body></html>");
Console.WriteLine(doc.Body.Children.Count);
Console.WriteLine(doc.GetElementById("myImage").Ge tAttribute("src"));
Console.WriteLine(doc.GetElementById("myLink").Get Attribute("href"));
منبع
http://stackoverflow.com/questions/9...an-html-string