开发者

Using WebBrowser Control - Hiding all the HTMLElements apart from one Div

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?

开发者_StackOverflowEdit

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜