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

  • Thread starter Thread starter AAaron123
  • Start date Start date
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
 
ImageUrl='<%#
String.Format("HttpHandlerSendImageData.ashx?Photoid={0}&Size=L",Eval('PhotoID'))
%>'
 
Back
Top