Help Needed with C# WebBrowser Classes.

Discussion in 'Mixed Languages' started by Xarzu, Oct 31, 2012.

  1. Xarzu

    Xarzu MDL Novice

    Nov 28, 2009
    13
    0
    0
    I am trying to write a metabrowser in C# and WPF.

    The first step is to test grabbing the result of a google search.

    To do this, I first tried using WebRequest and WebResponse classes. To my suprise, the document that returned did not have the search results incoded. Instead, if I took the html code from the WebResponse, it basically looked like an initial google home page.

    I spent some time investigating this and I found out that the program seemed to be running correctly because if you do a google search using the IE browser, and then select to view the source, and save that source to an html file and load it back into the browser, it will mysteriously appear as the google home page.

    Further investigation showed that this was not the case with the firefox browser which showed source html that contained the google search results.

    if I am not being specific enough, please tell me.

    At this point, the idea is that my problem is that I should be using the WebBrowser class insted of the WebRequest and WebResponse classes and view the html because what I was seeing what the html that came off the server and was not yet processed by the browser by the javascript on the page.

    I just had an idea. I will come back and add more to this post as things progress....
     
  2. Alphawaves

    Alphawaves Super Moderator/Developer
    Staff Member

    Aug 11, 2008
    5,872
    20,129
    180
    Can you post the code your trying ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...