title: how to display the contents of file in multi-line textbox in readable format and in asp.net C#
body: <p>I am using FileUpload Control to upload the files in FileUpload.aspx page, now i wants to display the contents of file in different page say -filecontents.aspx.
  For that i am using StreamReader and even getting the contents but in encoded format(not in readable format).</p>
  
  <p>How to get the contents of uploaded file in readable format.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>public string ShowContent(string path)
      {
          string savePath = @"D:\CloudStorageSecurity\CloudStorageSecurity\CloudServer1\";
          string strInput = "";
          string GetStream = "";
  
          if (File.Exists(path))
          {
              StreamReader sr = new StreamReader(path, Encoding.Unicode);
              strInput = sr.ReadLine();
              while (strInput != null)
              {
                  GetStream += strInput;
                  strInput = sr.ReadLine();
              }
              sr.Close();
          }
          else
          {
              Response.Write("file does not exist!");
          }
          txtFileCOntents.Text = GetStream;
      }
  </code></pre>