I'm using WebBrowser control to load my page. I want to hide all the html elements in the page apart from a particular div (and its children). I've the id of that particular div. How can I hide all the other elements?
I'm creating the webbrowser instance dynamically. I want to navigate to a URL and take a screen shot of the page partially (a particular div). So I want to hide all the other elements in the page and take a screenshot.
I used JQuery to hide all the elements apart from my div and its children. I referred this post for the script and called the script in the webbrowser using InvokeScript(). It worked perfectly.
精彩评论