title: How to save multiple values into one text file in ASP.NET MVC
body: <p>I need to save multiple values from multiple text boxes into one text file. I'm able to save only the <code>firstName</code> but not the <code>Surname</code>. Any suggestion on how to save the both surname and the first name into one single textfile?</p>
  
  <p>This is my controller: </p>
  
  <pre><code>    public class SampleController : Controller
      {
          //
          // GET: /Sample/
          [HttpPost]
          public ActionResult Create(Information information)
          {
              var byteArray = Encoding.ASCII.GetBytes(information.FirstName);
              var stream = new MemoryStream(byteArray);
              return File(stream, "text/plain", "your_file_name.txt");
          }
  
          [HttpGet]
          public ActionResult Create()
          {
              return View();
          }
      }
  </code></pre>