locked
frameborder="0" being ignored RRS feed

  • Question

  • In my XAML page, I'm using a compiled class, that inherits from ContentControl, to host an aspx page.  The class dynamically creates a div, and within that, an iFrame.  The iFrame construction includes the statement

    frame.SetAttribute("frameborder", "0");

    However, the displayed iFrame still has a border.  I've tried specifying the src property as part of the construction, or skipping that step and updating it later (one post suggested that setting the frameborder property has no effect after the frame has content), but the frame is always shown.  Also, the attribute is set before the frame is added to the div (another post suggested that was important), but that also doesn't help.

    How can I suppress the frame border?

    Bill

    Tuesday, May 10, 2011 10:57 AM

Answers

  • Try this:

    frame.SetAttribute("frameBorder", "0");

    It's case sensitive.

    Tuesday, May 10, 2011 9:08 PM

All replies

  • Try this:

    frame.SetAttribute("frameBorder", "0");

    It's case sensitive.

    Tuesday, May 10, 2011 9:08 PM
  • Thanks!  Worked like a charm.  I can't believe things like this still exist, in our Intellisense-driven development world.

    Tuesday, May 10, 2011 9:20 PM