I want to know how can i prompt user to download pdf file.
I have below code but it is not returning anything.
public ActionResult DownloadAssetClassGuide()
{
string folder = @"C:\NewFolder";
string file = "xyz.pdf";
string fullPath = Path.Combine(folder, file);
byte[] fileBytes = System.IO.File.ReadAllBytes(fullPath);
return File(fileBytes, "application/pdf", file);
}
am i missing something?