views:

326

answers:

1

I have a Windows Forms application in C#/Visual Studio 2008 with an IE WebBrowser control. In the DocumentCompleted event, I want to search the WebBrowser.Document or WebBrowser.DomDocument to see if jQuery is already present in the page.

What's a good way to accomplish this?

Thanks!

+2  A: 

Did you try:

bool hasjQuery = webBrowser1.Document.InvokeScript("jQuery") != null;
Crescent Fresh
Thanks!, I'll mark you as the answer as soon as I can test it in a few cases.
ZeroBugBounce