I have a Jquery dialog, which opens up on click of a link.
This click populates the dialog using AJAX. One of the things I need to do is populate it with an image based on the ID coming back from the data returned from the AJAX method.
The images in the site use and ImageHandler to display images like so:
~/ImageHandlerDefault.ashx?id=1467
This works great, But is there a way I can set an image using the AJAX web method or does it need a postback?
I have attempted to hard code a value but this has not worked:
$('.openwoimage').attr('src', '~/ImageHandlerDefault.ashx?id=1467');
I can change the alt etc but the src is nto working.
Does anyone have any advice or a better way of doing it?
thanks
Use
ResolveUrlto get the “client” version of the path from the server version.