Howlingfish
Howlingfish

Reputation: 301

webbrowser control c# find occurance of the following text

i would like to do a test to see if the following text shows up on my webbroswer control

<form method="post" action=""><table border="0" class="formPage"><tr><td colspan="2" class="msg">Link submitted and awaiting approval.<br />Submit another link.</td></tr>

Im looking for the text "Link submitted and awaiting approval."

Upvotes: 0

Views: 763

Answers (1)

icktoofay
icktoofay

Reputation: 128991

I believe you could use something like this:

if(webBrowser.DocumentText.Contains("Link submitted and awaiting approval.")) {
    // Do something.
}

Upvotes: 1

Related Questions