Click here to Skip to main content
11,478,642 members (63,521 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 20-Nov-12 20:18pm
udusat131.4K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

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
  Permalink  
Comments
udusat13 at 21-Nov-12 6:46am
   
Thanks For Solution.
Milind_T at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 209
1 F-ES Sitecore 170
2 Frankie-C 120
3 OriginalGriff 105
4 DamithSL 95
0 Sergey Alexandrovich Kryukov 7,865
1 OriginalGriff 7,341
2 Sascha Lefèvre 3,059
3 Maciej Los 2,491
4 Richard Deeming 2,335


Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 21 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100