I\'m looking for a method that will allow me to get the title of a webpage and store it as a string.
However all the solutions I have found so far involve downloadin
A simpler way to handle this would be to download it, then split:
using System;
using System.Net.Http;
private async void getSite(string url)
{
HttpClient hc = new HttpClient();
HttpResponseMessage response = await hc.GetAsync(new Uri(url, UriKind.Absolute));
string source = await response.Content.ReadAsStringAsync();
//process the source here
}
To process the source, you can use the method described here in the article on Getting Content From Between HTML Tags