c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
asp.net MVC

How to display Image in MVC asp.net?

| | ASP-NET , CSharp , MVC

In this article I am explains about how todisplay Image using MVC asp.net. It is simple by using @Url.Content(“imageLoction”).Here I am using entity frame work the object model contains property namecalled pictureLocation. The PictureLocation property having the image path.

 Eg: location of image is ~/img/chiptrolls.jpg

 <img src= "@Url.Content(Model.PictureLocation)" alt="IMAGES" />