webbrowser send text to control

  • Thread starter Thread starter David A. Beck
  • Start date Start date
D

David A. Beck

I need to enter data on a web page. I have been able to navigate using the
VB.NET WebBrowser control and see the contents of each page. What I need to
do now is to fill in the controls on the page with text and send an <enter>
key. If WebBrowser can't do this, does anyone know of a different managed
control that can do this?

Dab
 
Hi,

Here is the code I use to call a JavaScript a the page. So you can create a
function in JavaScript which will to the change on the form with the
arguments passed to it.

Dim MyWin As IHTMLWindow2 = PageForText.Document.parentWindow

MyWin.execScript("SetHTML(""" & HTML.Replace("""", "\""") & """);",
"javascript")


Mine was used with only one paramater, but you can do what you want.

You will need to have a reference to Interop.SHDocVw and AxInterop.SHDocVw.
(If you need those tell me I'll send 'em to you). These are for the old
browser version, but it's working really fine.
 
I'm using this to fill in data on a web page controlled by someone else from
a VB.NET program. I'm struggling with how I would use JavaScript in this
context. Can you help me understand?
 
Back
Top