Start New Discussion within our Software Development Community

i want to connect to a site and use data in it, like a program that connects to, search for a movie and returns information, i want to do that with, or

i want to write a game name in a textbox, and when i press the "search" button, the program looks in site and return me cheats of that game...

can anyone help me plz??

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 ""

WebBrowser1.Document.All("TheSearchedSitesTextboxName").Value = MySearchTextboxName


Does this help?

now my problem is finding the source code of site!! how can i do that?
i dont know web programing

and 1more thing, how can i show my search result in a listview?

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.

there is no "Click" and "Value" method in webbrowser object, im using VB.Net 2008

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 -


You can fetch webpage in C#. Make a class and call in your project

WebRequest request = WebRequest.Create("http://wep page address");
WebResponse response = request.GetResponse();
System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream());
string plainText = reader.ReadToEnd();

This article has been dead for over six months. Start a new discussion instead.