First of all I am fairly new to this so please forgive me if I am asking a noobish question. I am using Xamarin Forms and trying to get some table data from a webpage. This is my current code block:
private async Task GetTheData()
{
try
{
string requestUrl = "http://www.ahpra.gov.au/Registration/Registers-of-Practitioners.aspx?reg=NMW0001317068";
HttpClient client = new HttpClient();
var response = await client.GetStreamAsync(requestUrl);
StreamReader streamReader = new StreamReader(response);
string contentResponse = streamReader.ReadToEnd();
var obj = JsonConvert.DeserializeObject(contentResponse);
Debug.WriteLine(obj);
}
catch(Exception ex)
{
Debug.WriteLine(ex.Message);
}
}
The exception gives me the log:
[0:] Unexpected character encountered while parsing value: <. Path '', line 0, position 0.
I am trying to get the data from the page and pull it out. I have been trying to do some research but can't seem to find any information on how to pull the data from an .aspx page.
Thanks in advance.