Hi,
try like below.
if (url != "")
{
UriBuilder uriBuilder = new UriBuilder(url);
HttpWebRequest request = HttpWebRequest.Create(uriBuilder.Uri);
HttpWebResponse response = request.GetResponse();
if (response.StatusCode == StatusCode.NotFound)
{
}
if (response.StatusCode == StatusCode.OK)
{
}
}
hope it helps.