WebImage Helper in ASP.NET MVC

WebImage Helper in ASP.NET MVC

ASP.NET MVC 3 provides various helper methods that are used for different purposes. WebImage helper method is one of them, which makes it very easy to display images in ASP.NET MVC. In this article, I will show you how you can use WebImage helper in ASP.NET MVC.

Open studio 2010 and create a new ASP.NET MVC 3 Web Application (Razor) project as seen below:

Choose Razor as the view engine and click OK.

Add a Controller and after adding a Controller adds the code as shown in the figure below. Also add a images folder in your which contained two images i.e. Desert.jpg and Coala.jpg.