Get Response From Web Browser

hi everybody,

i have a web browser in my form, and im hitting a url with some data after which i will be getting a response from the URL, im using document complete event to trap the response, well everything goes fine till the event fires, but im not able to receive the response and store it in a variable, i tried it in 2005 with this

wBrowser.DocumentText.ToString()...., works fine

but i need the equivalent for this in 2003

Helps Please



Answer this question

Get Response From Web Browser

  • zhihao

    hi,

    no problem got it


  • Javier Martinez

    hi,

    ya i have tried out but i receive mshtml does not exist, actually i want to know how will be the response coming, in the html format, if so i have fiter out the responses and do some if else conditions, how could it be acheived.

    Regards,

    Prasenna. K


  • chaza

    hi ye,

    mshtml.HTMLDocument doc = (mshtml.HTMLDocument)this.axWebBrowser1.Document ;

    MessageBox.Show(doc.body.outerHTML);

    but whats this mshtml, how to import it to our code behind, to which class it belongs to


  • SanderS

    By default, there's no a WebBrowser control on the toolbox in VS 2003, but you can import a COM component called "Microsoft Web Browser",it does have a DocumentComplete event for you to handle,

    private void axWebBrowser1_DocumentComplete(object sender, AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e)

    {

    mshtml.HTMLDocument doc = (mshtml.HTMLDocument)this.axWebBrowser1.Document ;

    MessageBox.Show(doc.body.outerHTML);

    }

    Hope it helps.Regards.

    Ye



  • sudhirvn

    Right click on the "References" folder in your solution explorer,select "Add reference",on the ".NET" tab, double click on the "Microsoft.mshtml" ,then click OK.

    Regards.

    Ye



  • Get Response From Web Browser