title: WebClient Get Updated Source
body: <p>I have a situation when the source I get from a site using WebClient/HttpWebRequest is different from the actual source from web browsing (different button_onclick).</p>
  
  <p>I guess the site updates the button very short after sending the first source,
  I would like to get an updated source of a site after like 1 second I've "been" there.</p>
  
  <p>I've tried something, but I don't really know how to do that.</p>
  
  <p>This is my try:</p>
  
  <pre><code>public class KeepAliveWebClient : WebClient
  {
      public string DownloadString(string address)
      {
          return base.DownloadString(address);
      }
      protected override WebRequest GetWebRequest(Uri address)
      {
          HttpWebRequest request = (HttpWebRequest)base.GetWebRequest(address);
          request.KeepAlive = true;
          return request;
      }
  
      protected override WebResponse GetWebResponse(WebRequest request)
      {
          var response = base.GetWebResponse(request);
          Thread.Sleep(2000);
          var newResponse = base.GetWebResponse(request);
  
          return newResponse;
      }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>