Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Visual-Studio VB.NET Forms , +
VB.NET - How do I search through Webpage source for particular div and output inside txt as msgbox?
 

So far I can download a webpage's source code. But I don't know how to search through it for a particular string of information.
 

Code so far:
Dim source As String = New System.Net.WebClient().DownloadString("http://pagewantingtouse.com")
 
The division is called "description", I'm after the information within it. I want to output it as a message-box.
 

Example below:
 
<div class="description">		
			The Amazing Spider-Man is a 2012 American superhero film based on the Marvel Comics character Spider-Man. It is the fourth installment of the Spider-Man film series, serving as a reboot.
				</div>
Posted 5-May-13 14:27pm
Comments
ThePhantomUpvoter at 5-May-13 19:58pm
   
You can use the string manipulation functions or a regular expression to do this.
e2850181 at 5-May-13 20:00pm
   
how?
ThePhantomUpvoter at 5-May-13 20:16pm
   
How what? The answer to "how" is write some code. Are you sure you want to ask "how"?
e2850181 at 5-May-13 20:23pm
   
I've asked for help on here so I can figure out how to do the above. You've not helped
ThePhantomUpvoter at 5-May-13 22:29pm
   
How exactly does "use the string manipulation functions or a regular expression to do this" not help you? How much are you going to learn from someone else writing your code for you?
Dave Kreskowiak at 6-May-13 9:47am
   
He HAS helped. You think he hasn't because he didn't write your code for you.
 
You have to do some research on "Regular Expressions" to do something like this. Sorry, but we can't hit you with the "Almighty Wand of Knowledge" and you suddenly know this stuff. YOU have to do some research and teach yourself something new.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 274
1 Shweta N Mishra 216
2 PIEBALDconsult 210
3 Sergey Alexandrovich Kryukov 185
4 BillWoodruff 174
0 OriginalGriff 7,620
1 Sergey Alexandrovich Kryukov 6,937
2 DamithSL 5,586
3 Manas Bhardwaj 4,946
4 Maciej Los 4,495


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 5 May 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100