tags:

views:

869

answers:

4

Hello I use an iframe tag in my asp.net page, but when i place any other controls in that page, after running the page except iframe tag no other controls displaying in that page, can anyone help me?

Thanks in advance

sangita

A: 

can you post your HTML code?

A: 

Perhaps you're not closing your IFRAME tag?

Nicholas H
+1  A: 

Are You putting your controls inside the iframe tag? Content You put over there will only be shown by (really) old browsers that don't support iframes. You need to make a second page and have the iframe load it (src attribute)

If the controls are outside the iframe, it should work fine. If it isn't, there must be a problem with the markup, like unclosed tags.

Example:

<form id="form1" runat="server">
    <asp:Literal ID="Literal1" runat="server">Outside IFRAME</asp:Literal><br />
    <iframe src="OtherPage.aspx">
        Your browser does not support IFRAMEs.
    </iframe><br />
    <asp:Literal ID="Literal2" runat="server">Outside IFRAME</asp:Literal>
</form>
Thorarin
+2  A: 

Make sure you have closing tag for the iframe, it should be like this:

 <form id="form1" runat="server">
    <div>
        <asp:Button ID="Button1" runat="server" Text="Before Iframe" /> <br />
        <iframe src="http://google.com"&gt;&lt;/iframe&gt;&lt;br />
        <asp:Button ID="Button2"
            runat="server" Text="After Iframe" />
    </div>
    </form>
Khalil Dahab

related questions