Link to home
Create AccountLog in
Avatar of RGuillermo
RGuillermoFlag for United States of America

asked on

downloading a webpage

Hello Experts
I am trying to download a webpage
and then programmatically clck on any button

AS an example I am using https://www.msn.com/en-us

My visual c# code is as follows

        private void button2_Click_1(object sender, EventArgs e)
        {
            string url = textBox_url.Text;
            WebClient webClient = new WebClient();
            webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
            webClient.DownloadFileAsync(new Uri(url), @"c:\tmp\aaaaaaa___myfile.txt");
        }

the problem is once I get the source code
I do not get the information of the lower part of the web page.
Like the small squares with additional news not as important as the main body

Why am I not getting the full code of the web page?
Are these js scripts that should be downloaded separately?
REgards,
ASKER CERTIFIED SOLUTION
Avatar of Mrunal
Mrunal
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of RGuillermo

ASKER

Thank you so much Experts!!