Whats Up guys
I'm building a small app just for fun that can read Meta Tags. I want open a page from a given URL (http://www.example.com) and be able to search for a particular Meta Tag () The program should be able to find this tag and extra the URL. I have been searching all day long without a single way on doing this. Can anyone give me hand?
Regards,
Juan
Kartheek Reddy NarahariPosted Feb 17, 2009, 3:21 AM
In case you want to do it in winodws application use a webbrowser control and from it's document you can easily read Meta tags using the following code
HtmlDocument doc = webBrowser1.Document;
Hope this helps.HtmlElementCollection metatags = doc.GetElementsByTagName("meta");
foreach (HtmlElement el in metatags)
{
MessageBox.Show(""+el.OuterHtml);
}