How to set the "style" attribute in c sharp webbrowser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Epiic
    New Member
    • Jul 2010
    • 1

    How to set the "style" attribute in c sharp webbrowser

    I have a webbrowser application and I need to change the "style" attribute of an HTMLElement. Every other attribute except style is working. I have no idea why.

    Example:
    Code:
      webBrowser.Document.GetElementById("elementName").SetAttribute("style", "display:block;");
    That does not work at all. Any suggestions/ideas?

    I was reading this, http://weblogs.asp.net/rweigelt/archive/2006/11/27/1062699.aspx, and apparently Style has it's own property... I don't know. Any help is appreciated.
Working...