473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

webbrowser send text to control

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
Apr 26 '07 #1
4 4850
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.

--

Thanks,
Jonathan Boivin
---
jo************@cints.net | http://www.cints.net

"David A. Beck" <da****@beckb.coma écrit dans le message de news:
%2****************@TK2MSFTNGP03.phx.gbl...
>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

Apr 26 '07 #2
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?
"Jonathan Boivin" <dj**@cyberinternautes.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
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.

--

Thanks,
Jonathan Boivin
---
jo************@cints.net | http://www.cints.net

"David A. Beck" <da****@beckb.coma écrit dans le message de news:
%2****************@TK2MSFTNGP03.phx.gbl...
>>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
<enterkey. If WebBrowser can't do this, does anyone know of a different
managed control that can do this?

Dab


Apr 26 '07 #3
What I would do then, it's downloading the HTML page (or reading the HTML
content within the browser) and after post back a url which is the one of
the form desired added by the fields & values.

Ex : http://www.DOMAIN.com/submit.asp?fie...&field2=value2

Jonathan Boivin
---
jo************@cints.net | http://www.cints.net
"David A. Beck" <da****@beckb.coma écrit dans le message de news:
e6**************@TK2MSFTNGP04.phx.gbl...
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?
"Jonathan Boivin" <dj**@cyberinternautes.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>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.

--

Thanks,
Jonathan Boivin
---
jo************@cints.net | http://www.cints.net

"David A. Beck" <da****@beckb.coma écrit dans le message de news:
%2****************@TK2MSFTNGP03.phx.gbl...
>>>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 <enterkey. If WebBrowser can't do this, does anyone know of a
different managed control that can do this?

Dab



Apr 30 '07 #4
What I would do then, it's downloading the HTML page (or reading the HTML
content within the browser) and after post back a url which is the one of
the form desired added by the fields & values.

Ex : http://www.DOMAIN.com/submit.asp?fie...&field2=value2

Jonathan Boivin

---
jo************@cints.net | http://www.cints.net
"David A. Beck" <da****@beckb.coma écrit dans le message de news:
e6**************@TK2MSFTNGP04.phx.gbl...
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?
"Jonathan Boivin" <dj**@cyberinternautes.netwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>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.

--

Thanks,
Jonathan Boivin
---
jo************@cints.net | http://www.cints.net

"David A. Beck" <da****@beckb.coma écrit dans le message de news:
%2****************@TK2MSFTNGP03.phx.gbl...
>>>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 <enterkey. If WebBrowser can't do this, does anyone know of a
different managed control that can do this?

Dab



May 3 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
1
by: Vetrivel | last post by:
Application architecture : Develop interface between two existing systems, a. Enterprise CRM system b. Web based intranet system. Environment : Intranet Server : IIS and ASP. Script :...
4
by: Supra | last post by:
I have a tab control in a which a few of the tabs include an AxWebBrowser browser control. Let say i have currently tabpage2 and i typed url in combobox when i pressed enter it doesn't display...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
2
by: Lance | last post by:
Hi All, Given a collection of links, how can I send them to a WebBrowser Control so that I can manipulate it's document? Ok, that's way too simplified of a question. I know how to send a link...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
0
by: Balex | last post by:
hi, I have a VB.Net app which "reads" in html pages from a web server using winhttp. The purpose is for the app to "fill in" data fields on the page, then send it back to the web server, as if a...
1
by: David Veeneman | last post by:
In .NET 2.0, how do I clear the contents of a web browser control? I'm using a WebBrowser control in a Windows Form app to display strings genrated by my application and formatted as HTML--I'm...
4
by: kimiraikkonen | last post by:
Hi, Just to test, i placed a simple webbrowser to login a site, this site has no problems and has same error with IE6 SP2 but it's suppressed as well and no problem with Firefox browser, but using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.