I have images in the database and I want to return the image for viewing from an action. Here\'s my action.
public FileContentResult Index(ItemImageRequest
The File ActionResult adds a line to the HTTP header like this:
Content-disposition: attachment; filename=foo
This will cause the browser to attempt to download the file. That's why there is an overload to specify the filename.
You can create your own ActionResult to do the downloading, and omit the Content-disposition.
If you want to copy-and-paste, I have the code for one on codeplex: ImageResult.cs