How do I get the CSS styling of a CSS element?
I have a page like below in my web browser that I want to get the style
atributte value . I tried:
HtmlElement ele = webBrowser1.Document.GetElementById("foo");
MessageBox.Show(ele.GetAttribute("style"));
but it outputs:
System.__ComObject
Why does it infer the type System.__ComObject
and how to handle it?
HTML page:
<div id="foo" style="display:block;">
a
</div>
+3
source to share