Solved

asp.net image invalid format

Posted on 2014-12-03
6
144 Views
Last Modified: 2014-12-12
<asp:Image runat="server" ID="coachImage" onerror="changeImage('-1.jpg')" Height="120px" CssClass="borderOnly"
           ImageUrl=http://www.google.com//UserData/VehicleImages/<%= Bind("VehicleID") %>/medium/Primary.jpg />
     

I have above image control in asp.net but it said invalid format. What is wrong and how to fix it?

Thanks,
0
Comment
Question by:ITsolutionWizard
6 Comments
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 40478499
Hi ITsolutionWizard;

Not sure but because the error states, image invalid format, I would try using a different Image to see if the jpg image you are using is not bad.
0
 

Author Comment

by:ITsolutionWizard
ID: 40478527
actually, the image alert message is Parser Error Message: The server tag is not well formed.
0
 

Author Comment

by:ITsolutionWizard
ID: 40478529
the image file is existed so it is valid.
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 26

Expert Comment

by:Shaun Kline
ID: 40478542
The ImageURL property should be enclosed in apostrophes so that the quotation marks in the BIND statement do not short circuit the property. Also, the BIND format is <%# Bind("<your field here>") %>.
0
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 40478544
Just because a file exist does not mean that the data it contains is correctly formatted for what the system expects.
0
 
LVL 80

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 40479984
remove the last \
http://www.google.com/UserData/VehicleImages/  doesn't work
http://www.google.com//UserData/VehicleImages/medium/Primary.jpg also  doesn't work

are you using google.com as a placeholder?
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

838 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