Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

asp.net image invalid format

Posted on 2014-12-03
6
Medium Priority
?
152 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 64

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
 
LVL 1

Author Comment

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

Author Comment

by:ITsolutionWizard
ID: 40478529
the image file is existed so it is valid.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 27

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 64

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 84

Accepted Solution

by:
David Johnson, CD, MVP earned 2000 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

927 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