ImageUrl="HttpHandlerSendImageData.ashx?Photoid=<%# Eval('PhotoID') %>&Size=L" Is not right

A

AAaron123

This is something I just can't get right.
The img works OK but the asp:image does not.


<img src="HttpHandlerSendImageData.ashx?Photoid=<%# Eval("PhotoID")
%>&Size=L" />
<asp:image runat="server"
ImageUrl="HttpHandlerSendImageData.ashx?Photoid=<%# Eval('PhotoID')
%>&Size=L" ></asp:image>


Viewing the source in the browser shows:
<img src="HttpHandlerSendImageData.ashx?Photoid=&lt;%# Eval('PhotoID')
%>&amp;Size=L" />

I've tried other combo but none that works.

Is it possible?


Thanks
 
H

Hakan Kucukel

ImageUrl='<%#
String.Format("HttpHandlerSendImageData.ashx?Photoid={0}&Size=L",Eval('PhotoID'))
%>'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top