473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Exists(graphic file on web)?

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.
Nov 22 '05 #1
1 1065
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
}

"Jim M" <an********@discussions.microsoft.com> ¦b¶l¥ó
news:O1**************@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g...
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.

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim M | last post by:
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.
2
by: Trygve Lorentzen | last post by:
Hi, I want to read a file from a http request (say, http://www.foo.com/test.exe) to my local hard drive. How can I do that? I need specific code examples here, not just "use HttpRequest and get...
5
by: ad | last post by:
I want to delete some text which begin with <!DOCTYPE and end with > in a file. How can I do it?
13
by: DC Gringo | last post by:
How do I test for existence of a file in the file system: If FileExists(myVariable & ".pdf") = True pnlMyPanel.Visible = True End If -- _____ DC G
9
by: Philip Wagenaar | last post by:
I have a function that converts a file to another formait. But sometimes it might take up to 50-100 milliseconds before the file exists on the location the folder is looking for. I want...
2
by: Alex | last post by:
Yes you can: <html><head><script language="javascript"> SaveToFile('This is a text to save in a file', 'C:\\temp\\test.txt'); alert(read('C:\\temp\\test.txt')); function SaveToFile (text,...
5
by: Eric Cadwell | last post by:
Is there a faster way to write the last 100K of a large file? This code takes almost two minutes to run on my machine. int buffer = 100000; int length = 2000000000; string file =...
12
by: snow | last post by:
Hi All, I noticed if file path has a white space, for example "C:\my document \test.txt", the function File.Exists(filePath) always return false in release mode. How could I make this function...
2
ADezii
by: ADezii | last post by:
Many times when writing VBA code, we find the need to work with Files in one form or another. Whatever the process may be, we need to be sure that a File is present in a specified location. One...
8
by: Nikhil | last post by:
what are the simple ways? I could think of os.open(), os.exec(touch file) are there any simpler methods?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.