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


0 comments:

Post a Comment