ImageTag Inside Dataview

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.....
 
A

Alexey Smirnov

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")
%>" />
 
M

MikeB

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")
%>" />
 

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

Top