Created
November 16, 2010 17:10
-
-
Save anaisbetts/702087 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static bool ValidateUri(string Uri) | |
{ | |
try | |
{ | |
var request = WebRequest.Create(Uri) as HttpWebRequest; | |
var response = request.GetResponse() as HttpWebResponse; | |
return (response.StatusCode == HttpStatusCode.OK); | |
} | |
catch | |
{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment