I can\'t find the Html.Image method in new MVC RC version. Please somebody give me example how to render simple Image in ASP .NET MVC RC sites.
If you need to reference an image in, say, the ~/Content/images/
folder, it can easily be done with just plain HTML:
The trick is the "/
" at the beginning of the src
attribute, which will tell the browser to start browsing folders at the root of the site. As ASP.NET MVC by default does not parse route urls on files that do exist on the server, the file will be retrieved as usual. This will also work on the Index
view of the Home
controller regardless of whether you have the url http://www.example.com/
, http://www.example.com/Home
or http://www.example.com/Home/Index