title: C# Getting The HTML of the Links(Content) from Website
body: <p>What I want is, opening a Link from a Website (from HtmlContent)
  and get the Html of this new opened site..</p>
  
  <p><em>Example: I have www.google.com, now I want to find all Links. 
  For each Link I want to have the HTMLContent of the new Site.</em></p>
  
  <p>I do something like this:</p>
  
  <pre><code>foreach (String link in GetLinksFromWebsite(htmlContent))
              {
                  using (var client = new WebClient())
                  {
                      htmlContent = client.DownloadString("http://" + link);
                  }
  
                  foreach (Match treffer in istBildURL)
                  {
                      string bildUrl = treffer.Groups[1].Value;
                      bildLinks.Add(bildUrl);
                  }
              }
  
  
  
  
     public static List&lt;String&gt; GetLinksFromWebsite(string htmlSource)
      {
          string linkPattern = "&lt;a href=\"(.*?)\"&gt;(.*?)&lt;/a&gt;";
          MatchCollection linkMatches = Regex.Matches(htmlSource, linkPattern, RegexOptions.Singleline);
          List&lt;string&gt; linkContents = new List&lt;string&gt;();
          foreach (Match match in linkMatches)
          {
              linkContents.Add(match.Value);
          }
          return linkContents;
      }
  </code></pre>
  
  <p>The other problem is, that I only get  Links, not Linkbuttons (ASP.NET)..
  How can I solve the problem?</p>