I have some jQuery that writes some image tags to the browser, but I want to reference them such that I don't have to hardcode the path, and I'm not able to use relative paths either. This is a .NET application, and I am trying to use server side tags.
So, I changed the following:
$('#IMG_' + myID).attr('src','../images/plus.gif');
to:
$('#IMG_' + myID).attr('src','<%= Url.Content("~/images/plus.gif") %>');
or:
$('#IMG_' + myID).attr('src','<%= ResolveUrl("~/images/plus.gif") %>');
When it runs I get javascript errors, Invalid argument on line 48, char 325 of jquery-1.4.2.min.js.