How to check whether the website is active or not using c#?

HttpClient client = new HttpClient();
var response = await client.GetAsync(url);
if (response.IsSuccessStatusCode)
{
   return "Active";
}
else
{
return "InActive";
}

Comments

Popular posts from this blog

Types of Architects

Basic measurements

Search html table contents based on its td using Jquery