I am unable to prepare string url for @Url.Content method.
Here is my block of code from Underscore template
<% var imgId = "~/Content/images/" +pocket.get('imageId'); %>
<div class="image1">
<% alert(imgId); %>
<img src= "@Url.Content("+<% imgId %>+")" alt="Assigned Details" />
I'll pass the "imageId" through pocket object.
I tried using following approach as well. Getting compilation error for imgId variable
<img src= "<%= @Url.Content(string.Format("~/Content/Images/{0}", imgId)) %>" />