I try to catch the HTML code from a webpage after I have logged in to a page.
HTML is returned but that is the orignal HTML only BEFORE I logged in. For example I try to find "Log out" and other content in the string "getDocumentHTML" returned which exists on the webpage. But that can't be found.

How do we returned the final HTML content for the webpage after logging in?

        private void button1_Click(object sender, EventArgs e)
            String url = textBox1.Text;
        private void webKitBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
            //This doesn't returnd the FINAL HTML content after a login to a webpage
            String getDocumentHTML = webKitBrowser1.DocumentText;

This can be tricky. It really depends on how the login is done for the page. You would have to log in to the base using your webKitBrowser1, using the code. Unfortantly I can't find the code awhile back, but you should be able to google and see what's possible

(Again depending on how the login logic works, some approaches may not work, for instance, I had one application I used a cURl library, however, to login completely, I had to have a cookie generated ahead of time, but for it to be valid, I had to login though like a web browser normally, to make the cookie valid)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.