title: Display the content of a memory stream in web browser
body: <p>I'm working on a MVC project which creates a memory stream which is used for XSLT Transform. At the end, I want to display the results of the transformation on any web browser.
  Following is memory stream is being created.</p>
  
  <pre><code>       XslCompiledTransform xsl = new XslCompiledTransform();
         xsl.Load(xsltpath);    
         MemoryStream stream = new MemoryStream();
         XmlWriter xmlWriter = XmlWriter.Create(stream);
         xsl.Transform(InputMessagePath, xmlWriter);
         xmlWriter.Close();
         // Pass or set the content of stream as a string or any other compatible type to the view to diplay
         stream.Close();
  </code></pre>
  
  <p>Is it possible to display the contents of a memory stream in a web browser? If it's not possible what would be the best way to do that? I'm thinking about creating temporary file and  pass its path to System.Diagnostics.Process.Start(path) as a parameter. But before that, it would be great to know the possibility of using the the stream object instead of creating a file to display the contents in a web browser.
  Thank you.</p>