Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
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:
VB
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:

HTML
<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
Comments
[no name] 5-May-13 19:58pm    
You can use the string manipulation functions or a regular expression to do this.
e2850181 5-May-13 20:00pm    
how?
[no name] 5-May-13 20:16pm    
How what? The answer to "how" is write some code. Are you sure you want to ask "how"?
e2850181 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
[no name] 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?

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900