EDUDOTNET

Tuesday, August 27, 2013

Dynamically Get/Add Web Page Title And Meta Tags Using C#

How To Get Web Page Title And Meta Tags By URL Using C#?
How To Add Dynamic Meta Tags Using C#?

We can get web page title and meta tags using c# by web url and also can add dynamic meta tags. We need to add "HtmlAgilityPack" for parse HTML document in c#.

Add Namespaces

using System.Text.RegularExpressions;
using System.Web.Script.Serialization;
using System.Web.UI.HtmlControls;
using HtmlAgilityPack;


Create Class And Function


Create Function For Getting Meta Tags

Add And Calling Functions

Get Results


1 comments:

  1. The road to success is not straight. There is a curb called Failure, a loop called Confusion; speed bumps called Friends; red lights called Enemies;caution lights called Family. You will have flats called jobs. But, if you have a spare called Determination; an engine called Perseverance; insurance called Faith, and a driver called Jesus, you will make it to a place called Success!!
    - The Sun Holidays Code Vouchers

    ReplyDelete