Exists(graphic file on web)?

  • Thread starter Thread starter Jim M
  • Start date Start date
J

Jim M

Does anyone have a method to determine if a graphic file exists in a certain
web location so that I know to display it or a substitute file?

Thanks in advance.
 
not a very good method.. just for your reference.. hope it helps.


try
{
imgLogo.ImageUrl = this.estate.Logo;
client = new WebClient();
Stream rsp = client.OpenRead(imgLogo.ImageUrl);
System.Drawing.Image img = System.Drawing.Image.FromStream(rsp);

// image is available
}
catch (WebException exp)
{
// image not available
}
 
Back
Top