views:

128

answers:

3

How do I set it so that when a link is clicked in a view, it prompts the user to download a file.

A: 

Make a link to a downloadable file.

If you want us to give more details, you'll need to give us more details.

SLaks
A: 

Try Server.TransmitFile() method. That's what I do it in ASP.NET WebForms and I would imagine it's the same in MVC.

Mike C.
+5  A: 

You can just return a FileResultType. http://msdn.microsoft.com/en-us/library/system.web.mvc.fileresult.aspx

stimms