ImageTag Inside Dataview

  • Thread starter Thread starter MikeB
  • Start date Start date
M

MikeB

Hello All, can someone please help me with the correct syntac of this?

<asp:Image ID="image" runat="server"
ImageUrl="~/Photos.aspx?UserImage=Y&Height=200&Width=150&ImageSource=<%#
Eval("PhotoPath") %>" />



If I right click on what is displayed, it isn't usig the Value of <%#
Eval("PhotoPath") %> and is using the actual string <%# Eval.....
 
Hello All, can someone please help me with the correct syntac of this?

<asp:Image ID="image" runat="server"
ImageUrl="~/Photos.aspx?UserImage=Y&Height=200&Width=150&ImageSource=<%#
Eval("PhotoPath") %>" />

If I right click on what is displayed, it isn't usig the Value of <%#
Eval("PhotoPath") %> and is using the actual string <%# Eval.....

VB:

<asp:Image ID="image" runat="server"
ImageUrl="<%#
"~/Photos.aspx?UserImage=Y&Height=200&Width=150&ImageSource=" &
Eval("PhotoPath")
%>" />

C#:

<asp:Image ID="image" runat="server"
ImageUrl="<%#
"~/Photos.aspx?UserImage=Y&Height=200&Width=150&ImageSource=" +
Eval("PhotoPath")
%>" />
 
Thank You

Alexey Smirnov said:
VB:

<asp:Image ID="image" runat="server"
ImageUrl="<%#
"~/Photos.aspx?UserImage=Y&Height=200&Width=150&ImageSource=" &
Eval("PhotoPath")
%>" />

C#:

<asp:Image ID="image" runat="server"
ImageUrl="<%#
"~/Photos.aspx?UserImage=Y&Height=200&Width=150&ImageSource=" +
Eval("PhotoPath")
%>" />
 
Back
Top