Prasenna

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



Re: Windows Forms Data Controls and Databinding Get Response From Web Browser

Zhi-Xin Ye - MSFT

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






Re: Windows Forms Data Controls and Databinding Get Response From Web Browser

Prasenna

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





Re: Windows Forms Data Controls and Databinding Get Response From Web Browser

Zhi-Xin Ye - MSFT

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






Re: Windows Forms Data Controls and Databinding Get Response From Web Browser

Prasenna

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





Re: Windows Forms Data Controls and Databinding Get Response From Web Browser

Prasenna

hi,

no problem got it