First you will need to view the source code for the specific web site and get their searchbox name and the submit button name from the source code.
Add a webbrowser to your form.
In code the following -
WebBrowser1.Navigate2 "http://www.MySiteToSearch.com/"
WebBrowser1.Document.All("TheSearchedSitesTextboxName").Value = MySearchTextboxName
WebBrowser1.Document.All("TheSearchedSitesSubmitButtonName").Click
Does this help?
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
Open the site you want to search, right click and select "View Source" or "View Source Code". This will bring up a html page with the source code. Search through the code for the textbox name, will normally be txtSearch or something similar.
After the search, make your browser visible, all the searched criteria will be there. You can add this to the listbox by manipulating the source code again. After search, view the source code and capture the names to be displayed. Add these to your listbox.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
My apologies, just made the switch to .net, still thinking vb6 -
WebBrowser1.Document.GetElementById("MySearchedTextboxName").SetAttribute("Value", Information.txtuser.Text)
If you want to read the returned data -
Dim myElement as HtmlElement
myElement = Webbrowser1.document.GetElementById("The name of the element here")
Dim Value as String = myElement.GetAttribute("value")
MessageBox.Show("Here is the value: " & Value)
Simulate the click event of the submit button -
WebBrowser1.Document.Forms("form1").InvokeMember("submit")
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20
I'll look over it during the weekend sometime.
AndreRet
Industrious Poster
4,706 posts since Jan 2008
Reputation Points: 391
Solved Threads: 481
Skill Endorsements: 20