Benny Sutton is 4 hire - just click here

Validate Value is a URL

Convenient way to check if string could be a valid web address see https://regexr.com/4te2d

           
        public static bool IsValidUrl(this string text)
        {
            Regex rx = new Regex(@"http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?");
            return rx.IsMatch(text);
        }
 
    

Returns true/false - call like this...

         
            strToCheck.IsValidUrl();