Chris
Chris

Reputation: 57

Check if a loaded webpage contains certain text?

Using VB.Net, how would I go about checking if a loaded page in a Web Browser object contains a certain line of text? Sorry if theres an obvious answer for this, I'm used to programming in Java.

Upvotes: 2

Views: 2286

Answers (1)

Ken Pespisa
Ken Pespisa

Reputation: 22284

The Web Browser object has a DocumentText property that allows you to get or set the HTML contents. You can search the HTML for the text.

See more on the WebBrowser class: http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx

Upvotes: 1

Related Questions