How to Bind Img Src using MVC3

Posted by Jayakumars under ASP.NET MVC on 3/19/2014 | Points: 10 | Views : 3350 | Status : [Member] [MVP] | Replies : 1
Hi

In my database employee based images stores using byte format
here my html page how to bind all employee image in my html page
my img tag

my img tag like this

Ex:
<img src="BindEmpImage('<%= Url.Action("GetEmpImage","EmpImage",new {EmpId = 8}) %>');" id="img1">

but i have more than image have how to bind this also using loop section in
MVC3 using controller.

Mark as Answer if its helpful to you

Kumaraspcode2009@gmail.com



Responses

Posted by: Chakravarthi on: 5/20/2014 [Member] Starter | Points: 25

Up
0
Down
Hi Jayakumars,

Try like this
<img src="@Url.Action("GetEmpImage","EmpImage",new {EmpId = 8})" id="img1"> 

Thanks

Chakravarthi

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response