get url in asp.net mvc code example
Example 1: c# get url html
using System.Net;
using (WebClient web1 = new WebClient())
string data = web1.DownloadString("URL");
Console.WriteLine(data);
}
Example 2: valid URL check in c#
public static bool CheckURLValid(this string source) => Uri.TryCreate(source, UriKind.Absolute, out Uri uriResult) && uriResult.Scheme == Uri.UriSchemeHttps;