Master Page makes IFrame dissapear/possible bug?

Last post 11-30-2005 9:17 AM by Andy Sutorius @ work. 5 replies.

Sort Posts:

  • Master Page makes IFrame dissapear/possible bug?

    11-22-2005, 8:48 AM
    If you build a master page and then a content page linking it to the master page and inside the content page create an IFrame (no runat) and set the height and width to a % (not pixels) then view the Master page, the IFrame dissapears. Can anyone reproduce this and validate my finding?
  • Re: Master Page makes IFrame dissapear/possible bug?

    11-22-2005, 10:59 AM
    • Contributor
      2,210 point Contributor
    • jdixon
    • Member since 06-24-2002, 8:41 AM
    • Redmond
    • Posts 438
    • AspNetTeam
    I did try this and cannot repro. When  you say 'view the Master page, the IFrame dissapears' is this at designtime?

    Default.aspx

    <%@ Page Language="C#" MasterPageFile="~/MasterPage.master"%>
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <
    iframe id="test" src="foo.htm" height="30%" width="30%" />
    </
    asp:Content>

    Master:

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <
    html xmlns="http://www.w3.org/1999/xhtml" >
    <
    head runat="server">
    <title>Untitled Page</title>
    </
    head>
    <
    body>
    <form id="form1" runat="server">
    <div>
    <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
    </asp:contentplaceholder>
    </div>
    </form>
    </
    body>
    </
    html>

    Foo.htm
    <html>
    <
    body>
    test
    </body>
    </
    html>

    This posting is provided "AS IS" with no warranties, and confers no rights.
    We Are Hiring
  • Re: Master Page makes IFrame dissapear/possible bug?

    11-22-2005, 1:28 PM
    >>is this at designtime?

    No this was at runtime. I adjusted my code and found that when I place table tag around the content place holder in the master the IFrame in the content page dissapears. Can you try to repro?

    <table><tr><td><asp:contentplaceholder id="ContentPlaceHolder1" runat="server">

    </asp:contentplaceholder></td></tr></table>

     
  • Re: Master Page makes IFrame dissapear/possible bug?

    11-22-2005, 3:43 PM
    • Contributor
      2,210 point Contributor
    • jdixon
    • Member since 06-24-2002, 8:41 AM
    • Redmond
    • Posts 438
    • AspNetTeam
    Ah - you are hitting DOCTYPE issues.

    Try changing your DOCTYPE tage to something like:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >

    This will put the browser in quirks mode. Lots of good reading on the web - I'll leave taht searching to you :)

    Note that this has nothing to do with Masterpages (or ASP.NET) - as it would happen with an HTML page with the same DOCTYPE tag.

    HTH

    JD

    This posting is provided "AS IS" with no warranties, and confers no rights.
    We Are Hiring
  • Re: Master Page makes IFrame dissapear/possible bug?

    11-22-2005, 4:27 PM
    Ahhh...thanks for pointing me in the right direction.
  • Re: Master Page makes IFrame dissapear/possible bug?

    11-30-2005, 9:17 AM
    FYI...for those interested in what I found visit http://www.quirksmode.org/css/quirksmode.html
Page 1 of 1 (6 items)