Hi, Create an ActionMethod which will return FileResult like
public ActionResult GetTextFile() { FileInfo f = new FileInfo("path"); return File(f, "application/pdf"); }
This will return pdf file stored on server. Similarly you can download any type of files. Yu can use FileStream as well. Hope this answeres your question. Mark it as answered if it helped you.
Pradeep ShetPosted Dec 11, 2014, 8:32 AM
Create an ActionMethod which will return FileResult like
public ActionResult GetTextFile()
{
FileInfo f = new FileInfo("path");
return File(f, "application/pdf");
}
This will return pdf file stored on server. Similarly you can download any type of files. Yu can use FileStream as well.
Hope this answeres your question. Mark it as answered if it helped you.