ASP Image URL

In my attached code I KNOW it's puilling data because if I output like this I get data
<asp:Label ID="lblAddress" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "LineTwo") %>'></asp:Label>

That returns sp1.jpg

But I can't seem to get THIS working...  
<asp:Image ID="Image1" runat="server" Width="628px"  ImageUrl='http://www.mydomain/cms/Images/<%# DataBinder.Eval(Container.DataItem, "LineTwo") %>' />

if I type 'http://www.mydomain/cms/Images/sp1.jpg in the browser it returns the image

A little help?
Larry Bristersr. DeveloperAsked:
Who is Participating?
 
Larry BristerConnect With a Mentor sr. DeveloperAuthor Commented:
I found my own workaround.  Placed this in a Telerik RadRotator and called the actual path.
0
 
OriNetworksCommented:
You have Width="628px" assigned but have you tried adding Height attribute?
0
 
OriNetworksCommented:
Also, when you preview the page, right-click the page and go to view source. Then try to find the img tag and make sure the syntax is correct. Post it here if possible.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
OriNetworksCommented:
Sorry for so many posts, but you can also try changing
<asp:Image ID="Image1" runat="server" Width="628px"  ImageUrl='http://www.mydomain/cms/Images/<%# DataBinder.Eval(Container.DataItem, "LineTwo") %>' />

to

<asp:Image ID="Image1" runat="server" Width="628px"  ImageUrl='/cms/Images/<%# DataBinder.Eval(Container.DataItem, "LineTwo") %>' />
0
 
Larry Bristersr. DeveloperAuthor Commented:
OriNetworks:
  I have to reference the other domain.  This is coming from a image provider
0
 
cauosCommented:
try this line

NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "LineTwo") , "http://www.mydomain/cms/Images/{0}")%>'

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.