title: How to get url from text file?
body: <p>i have inserted some web URL's in a text file.</p>
  
  <p>Like:</p>
  
  <pre><code>www.google.com
  www.facebook.com
  www.twitter.com
  www.yahoo.com
  </code></pre>
  
  <p>And I want to browse web page URL form text file in c# webBrowse1 control.</p>
  
  <p>please tell me how it works.</p>
  
  <p>This is my code but it didn't work.</p>
  
  <pre><code>try
  {
      FileStream fs = new FileStream("link.txt",FileMode.Open,FileAccess.Read);
      StreamReader sr = new StreamReader(fs);
      webBrowser1.Navigate(sr);
      webBrowser1.ScriptErrorsSuppressed = true;
      while (webBrowser1.ReadyState != WebBrowserReadyState.Complete)
      {
          Application.DoEvents();
      }
  }
  catch(Exception)
  {
       MessageBox.Show("Internet Connection not found", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
       this.Close();
  }
  </code></pre>