Go to Comments





How to validate url in c# .net csharp


Created: 30/10/2014 04:04:18 p.m.



 
  How to validate url in c# .net csharp


This is the best method i found to validate url in c#


public static bool isValidUrl(string url)
{
if (Uri.IsWellFormedUriString(url, UriKind.Absolute))
{
return true;
}
else
{
return false;
}
}



Comments: