Click here to Skip to main content
15,893,564 members
Articles / Web Development / ASP.NET

Get page HTML from URL using WebClient, Strip HTML using Regex , export a list of Anchors into Excel or XML.

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
6 Nov 2012CPOL2 min read 31.5K   793   11  
Get page HTML using System.Net.WebClient class of .NET as well as striping HTML using Regex and export a list into Excel or XML.
using System;
using System.Collections.Generic;

namespace LinksFromUrl
{
    public static class ExportAllLinks 
    {
       
       public static void ExportLinks(string WebUrl, ExportType type)
       {
           using (GetLinks obj = new GetLinks())
           {
               obj.ExportLinks(WebUrl, type);
           }
       }
       public static Dictionary<String, String> GetAllLinks(string WebUrl)
       {
           using (GetLinks obj = new GetLinks())
           {
               return obj.GetAllLinks(WebUrl);
           }
       }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer (Senior) ERICSSON INDIA GLOBAL SERVICES PVT. LTD
India India
MCPD 3.5 in 2011
Working as a Senior Dot Net Developer/Integration Engineer since last six years

Comments and Discussions