-
How to return an image from Asp.Net MVC Controller
about 9 years ago
-
about 9 years ago
Hi Mayank, This can be done by following code
return File("~/Content/Penguins.jpg","image/jpg");
That means you are telling to return the Penguins.jpg file from the content folder(The path may be dynamic)
and the second parameter tells that the file type returned should be of image type
1 Answer(s)