AxWebBrowser

  • Thread starter Thread starter Anil Gupte
  • Start date Start date
A

Anil Gupte

OK, I have spent the whole day on this and I only forward about an inch (and
I have miles to go....) :-)

Anyway, I have this outside in the form:

Dim WebBrowserPay As New AxSHDocVw.AxWebBrowser

Then I have various functions trying to work with it. For example:

Private Sub btnPaymentOK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPaymentOK.Click
'Other Stuff
Dim url As String
url = "http://www.mysite.com/PayPal.asp"
frmDebug.lblURL.Text = url
url = url & "?VideoName='" & L3G.Title & "'&Price=" & L3G.Price.ToString
& "&CUID=" & L3G.CUID & "&TransactionID=" & TransactionID
WebBrowserPay.Navigate(url)
'Other Stuff
End Sub

Now what? How do I get and parse the HTML of the page. I cannot find any
properties of the Document property including Download complete or HTML (I
am sure I used it or something simialr a few years ago in VB6).

I read somewhere about adding mshtml.dll from \windows\system32 as a
reference, but it won't let me add it - it says something like this is not a
vali assmebly or com component.

Thanx,
 
Anil Gupte said:
OK, I have spent the whole day on this and I only forward about an inch
(and I have miles to go....) :-)

Anyway, I have this outside in the form:

Dim WebBrowserPay As New AxSHDocVw.AxWebBrowser

Then I have various functions trying to work with it. For example:

Private Sub btnPaymentOK_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnPaymentOK.Click
'Other Stuff
Dim url As String
url = "http://www.mysite.com/PayPal.asp"
frmDebug.lblURL.Text = url
url = url & "?VideoName='" & L3G.Title & "'&Price=" &
L3G.Price.ToString & "&CUID=" & L3G.CUID & "&TransactionID=" &
TransactionID
WebBrowserPay.Navigate(url)
'Other Stuff
End Sub

Now what? How do I get and parse the HTML of the page. I cannot find any
properties of the Document property including Download complete or HTML (I
am sure I used it or something simialr a few years ago in VB6).

I read somewhere about adding mshtml.dll from \windows\system32 as a
reference, but it won't let me add it - it says something like this is not
a vali assmebly or com component.

Thanx,

Which version of dot.net are you using??

LS
 
In the WebBrowserPay.DocumentComplete event you can get the HTML from
WebBrowserPay.Document.Body.InnerHtml

Good Luck,
Johnny J.
 
Johnny,

However you are writing about the AxWebbrowser in your subtitles not About
the Webbrowser. Don't mix those two with each other (although that the
Webbrowser uses the AxWebbrowser has it other members). You can use the
webbrowser in version after 2003 by simple dragging it on a form from your
toolbox where it is standard located..

Cor
 
I am using .Net 2003.

In answer to to Johnny J. thanx, that worked i.e.
WebBrowserPay.Document.Body.InnerHtml

I was trying WebBrowserPay.Document.InnerHtml directly which was wrong

Thanx much.
 
Back
Top