In my MVC app, the images will b in the App_Data folder. I want to give the source to my img tag in Jquery. Here is how I do it:
var src1 = <%=Url.Content(Server.MapPath("/AppData/1.jpg"))%>
$("#imgLocation").attr("src", src1);
But it doesn’t work. Why?
try following: