Welcome to the tutorial on HOW TO DISPLAY IMAGE IN ASP.NET MVC. You are at right place to move ahead.
Sometimes in life we feel difficulties with small things too, if we can't solve that we can't move ahead, similarly this is the thing here, it is also a pretty easy way to do, but at first we all get difficulties, here the solution for displaying images in asp.net mvc.
At first Add a image file in Content folder.
Right click on Content > Add > Existing Item> choose image> OK
HTML Code in file Home/index.cshtml
<img src="@Url.Content("~/Content/imagename.png")" width="500" height="500" />
Its that much easy, Good luck and keep going, I m always with you :)
Further You can watch this video too.
No comments:
Post a Comment