title: Looping through lines of txt file uploaded via FileUpload control
body: <p>I want to select a simple .txt file that contains lines of strings using a FileUpload control. But instead of actually saving the file I want to loop through each line of text and display each line in a ListBox control.</p>
  
  <p>Example of a text file:</p>
  
  <p><strong>test.txt</strong></p>
  
  <p>123jhg345<br/>182bdh774<br/>473ypo433<br/>129iiu454</p>
  
  <p>What is the best way to accomplish this?</p>
  
  <p>What I have so far:</p>
  
  <pre><code>private void populateListBox()
  {
    FileUpload fu = FileUpload1;
  
    if (fu.HasFile)
    {
      //Loop trough txt file and add lines to ListBox1
     }
   }
  </code></pre>