locked
How to make WCF query in <img src> tag return image? RRS feed

  • Question

  • User-1778014415 posted

    Hi,

    I'm currently trying to make an html form query our webservice (GET) and return a string, but the call needs to be done inside the img src tag like this :

    <img src="http://myWCFService.com/Image.svc/getImage?value=1"/>

    This query returns a valid URL String to an image such as : http://google.com/logo.jpg

    I would like the end result to look like this :

    <img src="www.google.com/logo.jpg"/>

    Currently the src does not change to the image URL.

    I read somewhere that I needed to 302 something in order to have it working but I'm not sure how to do this with WCF.

    What do I need to do in order to have the src tag replaced with the return value of the WCF service?

    Thanks

    Kevin

    Thursday, January 30, 2014 12:56 PM