title: Why are HttpWebRequest and WebBrowser getting different HTML source code?
body: <p>I am trying to get the source code from a webpage. The WebBrowser control is giving me the information that I am looking for. However, I want to use HttpWebRequest, but its giving me different source code than the WebBrowser DocumentText.</p>
  
  <p>Can anyone please tell me how can I get the same source code as WebBrowser using HttpWebRequest?</p>
  
  <p><strong>WebBrowser Code:</strong></p>
  
  <pre><code>WebBrowser1.Navigate("http://www.networksolutions.com/whois/results.jsp?domain=" &amp; txtUrl.Text)
  textbox1.Text = WebBrowser1.DocumentText
  </code></pre>
  
  <p><strong>WebBrowser Result:</strong></p>
  
  <p><a href="http://textbin.com/f4368" rel="nofollow">http://textbin.com/f4368</a></p>
  
  <p><strong>HttpWebRequest Code:</strong></p>
  
  <pre><code>Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
  request.KeepAlive = False
  request.Timeout = 10000
  
  Dim response As System.Net.HttpWebResponse = request.GetResponse()
  
  Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
  Dim sourcecode As String = sr.ReadToEnd()
  </code></pre>
  
  <p><strong>HttpWebRequest Result:</strong></p>
  
  <p><a href="http://textbin.com/2h445" rel="nofollow">http://textbin.com/2h445</a></p>