?
Solved

ASP Image URL

Posted on 2009-05-01
6
Medium Priority
?
437 Views
Last Modified: 2013-11-26
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?
0
Comment
Question by:lrbrister
  • 3
  • 2
6 Comments
 
LVL 17

Expert Comment

by:OriNetworks
ID: 24284687
You have Width="628px" assigned but have you tried adding Height attribute?
0
 
LVL 17

Expert Comment

by:OriNetworks
ID: 24284690
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
 
LVL 17

Expert Comment

by:OriNetworks
ID: 24284695
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:lrbrister
ID: 24284758
OriNetworks:
  I have to reference the other domain.  This is coming from a image provider
0
 
LVL 4

Expert Comment

by:cauos
ID: 24285727
try this line

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

0
 

Accepted Solution

by:
lrbrister earned 0 total points
ID: 24286221
I found my own workaround.  Placed this in a Telerik RadRotator and called the actual path.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question