Part 47 Displaying images in asp net mvc

In this video, we will discuss displaying images in MVC application. In Part 48, we will create a custom html helper to display images. We will be using the example, that we worked with in Part 46. We want to display Employee photo, along with the personal details. Alter table tblEmployee to add Photo, and AlternateText columns. Alter table Add Photo nvarchar(100), AlternateText nvarchar(100) Update Photo and AlternateText columns Update tblEmployee set Photo=’~/Photos/JohnSmith.png’, AlternateText = ‘John Smith Photo’ where Id = 1 Right click on the solution explorer and add “Photos” folder. From my blog download JohnSmith.png and add to “Photos” folder. Now, in MVCDemo project, update Sam

It's only fair to share...Tweet about this on TwitterShare on FacebookShare on TumblrShare on Google+Digg thisShare on LinkedInPin on PinterestShare on VKShare on RedditPrint this pageEmail this to someone
Flattr the authorShare on StumbleUponShare on YummlyBuffer this page

Leave a Reply

Your email address will not be published. Required fields are marked *