Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have an ASP.NET application where I send down a bunch of bitmaps to the clients. These are all the <asp:Image> control, and I set the URL of it to the path of the bitmap on the server. I do this in the code-behind of the page, because the image can be different based on different conditions.

This works almost all of the time, but once in a while, the client starts showing the unknown image instead. I don't set the unknown image in the control on the server, but rather this is the unknown image that the browser shows when it isn't getting valid data or URL or something like that.

I was wondering if there was a way I could look for this case, using possibly Javascript or jquery or something like that?

Thanks.
Posted
Updated 15-Jun-15 5:21am
v2
Comments
F-ES Sitecore 15-Jun-15 11:30am    
When it is showing the unknown image picture have a look at the html source to see what the url is, and/or the network traffic in the browser's dev tools (f12). That will help narrow down what the problem might be.
David Knechtges 15-Jun-15 11:46am    
Yeah, that is a good idea. Unfortunately, I have the clients update themselves every 1.5 seconds, so I can't look at it in the browser's tools before the update happens. Perhaps there is a way in Chrome or IE to make the page stop updating itself through the page's timer?

Thanks.
F-ES Sitecore 15-Jun-15 11:56am    
in Chrome there is a "Preserve log" checkbox. If you check that it stops the network tracing clearing on each page request.
ZurdoDev 15-Jun-15 14:59pm    
If it is refreshing that often, it could simply be a case where the browser "bugs" out and doesn't get the image properly. Does it clear up after the initial error?
Richard Deeming 15-Jun-15 12:02pm    
"I set the URL of it to the path of the bitmap on the server"

This might be a dumb question: are you setting the URL to the physical path of the file on the server? Something that looks like C:\path\to\the\image.jpg?

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