Add image source in Jquery
<p>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:</p>

<pre><code>var src1 = &lt;%=Url.Content(Server.MapPath("/AppData/1.jpg"))%&gt;
$("#imgLocation").attr("src", src1);
</code></pre>

<p>But it doesn't work. Why?</p>
