Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

Check if ImageURL (which is an internet url) exists?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 01 Mar 2008 19:28 GMT
Hi. Is there a way programmatically to check if an image control's ImageURL
property (which is an image on the internet) actually exists?  I have a 3rd
party company that hosts all the images displayed on my site, and I want to
display a default image if the ImageURL for a specific image doesn't exist.

Thanks!
Jesse Houwing - 01 Mar 2008 21:52 GMT
Hello Mike,

> Hi. Is there a way programmatically to check if an image control's
> ImageURL property (which is an image on the internet) actually exists?
> I have a 3rd party company that hosts all the images displayed on my
> site, and I want to display a default image if the ImageURL for a
> specific image doesn't exist.

You could do a webrequest (would probably be best to just check the headers)
from the server. If it comes back other than 200, it doesn't exist.

You might want to cache the result though... it won't be pretty otherwise...

--
Jesse Houwing
jesse.houwing at sogeti.nl
Mike - 02 Mar 2008 21:07 GMT
Thanks I'll give it a try!

> Hello Mike,
>
[quoted text clipped - 12 lines]
> Jesse Houwing
> jesse.houwing at sogeti.nl

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.