Showing posts with label webclient. Show all posts
Showing posts with label webclient. Show all posts

Tuesday, January 14, 2014

Get Page Title and Image from Url using C# in ASP.NET

Hi,
Today's topic is about to fetch the title and image of an Url (i.e. http://facebook.com). Here I will do this operation with the help of  regular expression. For regular expression you can refer this link.

So, the main logic behind to fetch the title is to get the page source and from there find the <title> tag, and put that into a string.

Add two namespaces in your page.

using System.Net;                                     // for webclient
using System.Text.RegularExpressions;     // for regular expression

Popular Posts

Pageviews