The following line will also modify the search text box contents on the same page:
WebBrowser1.Document.GetEl
Note that index 1 is used, thus referring to second input tag in the document, as there is a hidden input placed before the search box (see HTML source of the page).
_______________
Nayer Naguib
Main Topics
Browse All Topics





by: nayernaguibPosted on 2008-03-24 at 02:41:49ID: 21192591
You can use the WebBrowser component as follows:
")
1.Document Text)
ementById( "q").SetAt tribute("v alue", "hello world")
1. The following line will retrieve a page from the internet:
WebBrowser1.Url = New Uri("http://www.google.com
2. The following line will show a message containing the HTML source of the document:
MessageBox.Show(WebBrowser
The DocumentText property is of type String, and therefore, the document source can be manipulated using string manipulation functions.
3. The following line will set the value of the Google search box. In this example you need to be aware in advance of the HTML ID of the component:
WebBrowser1.Document.GetEl
_______________
Nayer Naguib