private string LoadContent()
{
Debug.WriteLine("LoadContent");
Debug.Indent();
string content = string.Empty;
if (!string.IsNullOrEmpty(url))
{
try
{
WebClient client = new WebClient();
content = client.DownloadString(url);
Debug.WriteLine("Success");
}
catch (Exception ex)
{
Debug.WriteLine("Error");
Debug.WriteLine(ex.Message);
}
}
else
{
throw new Exception("Please provide a valid URL");
}
Debug.Unindent();
return content;
}