View Single Post
  #26  
Unread 02-27-2005, 12:39 AM
causas causas is offline
A Coastal Crab
 
Join Date: Feb 2005
Server: Antonia Bayle
Posts: 1
Default

Quote:
Originally Posted by taco-man
sounds good to me i always like less work

by the way, you dont happen to know how to check if a file exists or not on a webserver do you? i tried using IO.File.Exists(url) but it didnt work, which is not suprising.
I am not sure if .NET would support this, but if it does use an xmlhttp request(this was done in JavaScript):

Quote:
xmlhttp.open("HEAD", "URL_TO_CHECK",true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
if (xmlhttp.status==200) alert("URL Exists!")
else if (xmlhttp.status==404) alert("URL doesn't exist!")
else alert("Status is "+xmlhttp.status)
}
}
xmlhttp.send(null)
more information can be found here: http://jibbering.com/2002/4/httprequest.html
Reply With Quote