Click here to Skip to main content
15,896,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,
I am using Image control in .aspx page to show images from http url address.
But it is not working properly as I want.
C#
OriginalImage.ImageUrl = "http://url address/" + OriginalImagePath;
TreatedImage.ImageUrl = "http://url address/" + treatedImagePath;

I am using above code to show images.Most of the time it showing images but some times the image is not displayed.
What is the problem?

Thanks & Regards,
Avinash Patil.
(Software Engineer-BTBP)
Posted
Updated 17-May-12 3:44am
v2
Comments
bhagirathimfs 17-May-12 10:08am    
may be due to slow net..
Actually the images take time to load from server if the net is slow than it ma not download the page and unable to the image...
Avinash6474 17-May-12 23:18pm    
Thanks for reply.
Stephen Hewison 17-May-12 10:22am    
It also depends what browser you're using. In my experience IE is impatient and will give up on requests quite quickly. Chrome on the other hand will wait for longer before returning a failed HTTP status.

Try using the developer tools in the browser it should show you the resources loaded into the page, which ones failed and how long each one took. Failing that, if you have control of the server providing the images, enable logging on the web server, you should be able to see each image request and the http status returned with it.

I had a similar problem when I moved an MVC project from test to production. I never found the cause, in the end I moved the static content so it was provided by a separate application pool. This fixed the problem.
Avinash6474 17-May-12 23:26pm    
Hi Stephen Hewison,
Thanks for reply,
I downloaded the developer tool msi file for internet explorer.Now how I can use in asp.net application to check image downloaded or not in the image control.
If you have any link related to the code samples please share it.

Thanks & Regards,
Avinash Patil.
Sunasara Imdadhusen 29-May-12 8:32am    
Please install Firebug for Mozilla and then performed following steps.
1. Press F12 to open Firebug window.
2. Click on Net tab.
3. Here you can see the status of your images.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900