Is there a method to validate URLs in .Net, ASP.Net, or ASP.Net MVC?
You can use Uri.IsWellFormedUriString, no need to create your own function for that:
public static bool IsWellFormedUriString(string uriString, uriKind uriKind);
Where uriKind can be:
UriKind.RelativeOrAbsolute
UriKind.Absolute
UriKind.Relative
For more info see: http://msdn.microsoft.com/en-us/library/system.uri.iswellformeduristring.aspx