I'm currently taking input from a registration form and download the input detail as a text file. the downloaded textfile result is : JimJone03/09/1998 00:00:00xxx@gmail.com 230436315
I want the result to be displayed in column format.
For example:
Jim Jone
03/09/98
xxx@gmail.com
+23057xxx556
This is what I have tried:
public ActionResult Create(Information information)
{
var byteArray = Encoding.ASCII.GetBytes(information.FirstName + ""
+ information.Surname + "" + information.DOB + ""
+ information.Email + " " + information.Tel);
var stream = new MemoryStream(byteArray);
return File(stream, "text/plain", "your_file_name.txt");
}