[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

asp.net image invalid format

<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
ITsolutionWizard
Asked:
ITsolutionWizard
1 Solution
 
Fernando SotoRetiredCommented:
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
 
ITsolutionWizardAuthor Commented:
actually, the image alert message is Parser Error Message: The server tag is not well formed.
0
 
ITsolutionWizardAuthor Commented:
the image file is existed so it is valid.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Shaun KlineLead Software EngineerCommented:
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
 
Fernando SotoRetiredCommented:
Just because a file exist does not mean that the data it contains is correctly formatted for what the system expects.
0
 
David Johnson, CD, MVPOwnerCommented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now