views:

486

answers:

2

hi

i want create small web browser , tiny and fast

but i have problem ,

let me explain :

1 - user enter site : google.com 2 - c# program get google.com 3 - find <td nowrap="" align="center"> 4 - in web browser only show that area

i dont know where i must start ,

thanks

+3  A: 

Ok, I'm going to try answer your question, but I am deciphering as well.

  1. Create a WebBrowser control on your form. (2.0 is fine for what you need) and .Navigate("http://www.google.com");
  2. Get the source code from the Document. You can do this as follows: string source = _WebBrowser.Document.Body.OuterHtml;
  3. Use string manipulation to get to the area on the page you need. For instance .SubString() functions
  4. Save the text into a file, or stream and load it into the WebBrowser control, or replace the pages Document HTML with just the HTML you are wanting to show.
Kyle Rozendo
For #3, you might get better and easier results by using a regular expression instead of SubString() and friends.
John Fisher
+2  A: 

Okay! Looking at the comment it seems you want to request for a page using c# and show only one part of the page. In your case its that specific <td> . Please correct me if I am wrong.

Other than what Kyle has mentioned. Check out HTML agility Pack. It might be of interest to you.

Shoban