Click here to Skip to main content
16,013,581 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have two pages, one is main page and another one is reconnect page. I have added the reconnect page in main page using iframe. the reconnect page has a button. In the main page i placed a div on the iframe. But i need to bring the reconnect button(only) on the div.

What I have tried:

Reconnect Page:

<div>
    <p> Reconnect the page </p>
    <asp:Button ID="reconnectButton" runat="server" Text="Reconnect"/>// button needs to be get front of "overlappedDiv"
</div>



Main Page:

 <div style="height:300px;width:300px;">
     <iframe id="reconnectPageFrame"  runat="server" src="ReconnectPage.aspx" style="Height:100%;width:100%;float:left"></iframe>
     <div id="OverlappedDiv" style="height:300px;width:100%;margin-removed-300px;float:left;" />
</div>
Posted
Updated 8-Aug-16 3:16am

You can't. The <iframe> is a single indivisible unit. You can only control the z-index of the entire <iframe>; you can't have elements from the contained document intermingled with elements from the containing document.

You'll either need to modify the ReconnectPage.aspx page so that it only contains the button you want to display, or move the button into the main page and replicate the functionality there.
 
Share this answer
 
Try setting the following on the button you want to bring to front:

CSS
style="position:absolute;z-index:10000;top:50%;left;50%"
 
Share this answer
 
Comments
Member 11125335 8-Aug-16 7:49am    
sorry friend. somehow its not working. its not getting front of the div, still it behind the div.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900