Read page with asynchronous call

0

I make a call via WebRequest and this page has a JavaScript function that the result of it can not retrieve (it loads an image). I need to wait to finish loading the page to after the page is fully loaded, and can I load the entire page?

Below the code:

            WebRequest request = webRequest.Create("http://www.receita.fazenda.gov.br/aplicacoes/atcta/cpf/consultapublica.asp");
            request.Credentials = CredentialCache.DefaultCredentials;
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            Console.WriteLine(response.StatusDescription);
            Stream dataStream = response.GetResponseStream();
            StreamReader reader = new StreamReader(dataStream);
            string responseFromServer = reader.ReadToEnd();
            Console.WriteLine(responseFromServer);
            reader.Close();
            dataStream.Close();
            response.Close();
    
asked by anonymous 12.11.2014 / 13:32

0 answers