Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Expert,

I am developing Simple Seo Website Trade biz

I am using c#,Asp.net.

And i am working on fetching meta information using url.

There is one textbox for website url.And using that i want to display meta information(title,keywords,description).

Please help me to solve this problem.
Thanks in adv.And sorry for poor english.
Posted

1 solution

You probably need to use some third party tool. HTMLAgilityPack is one open soure tool which can be useful for the purpose.
For example to get description you can simply write a small code

C#
HtmlDocument myDoc = new HtmlDocument();
myDoc.Load(path);
HtmlNode descNode = doc.DocumentNode.SelectSingleNode("//meta[@name='description']");
if (descNode != null) 
{
    string desc = descNode.GetAttributeValue("content", "");
}

The link to the tool: http://htmlagilitypack.codeplex.com/[^]

Some examples at: http://htmlagilitypack.codeplex.com/wikipage?title=Examples[^]

Hope that helps. If it does, mark this as solution/upvote.

Milind
 
Share this answer
 
Comments
udusat13 21-Nov-12 6:46am    
Thanks For Solution.
MT_ 21-Nov-12 9:19am    
Welcome. Glad it helped.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900