I did it. Didn't need the ResourceManager
at all.
In my Controller:
public FileResult Download(string filename)
{
byte[] fileBytes = null;
switch (filename)
{
case "Flyer Instructie.pdf":
fileBytes = Resources.Resources.Flyer_Instructie;
break;
case "Flyer Front.pdf":
fileBytes = Resources.Resources.Flyer_Front;
break;
case "Flyer Back.pdf":
fileBytes = Resources.Resources.Flyer_Back;
break;
}
return File(fileBytes, MediaTypeNames.Application.Octet, filename);
}
And in my View:
<%: Html.ActionLink(Resources.DownloadsInstructionText, "Download", "Home", new { filename = Resources.DownloadsInstructionLink }, null) %>