Home > Forum > ASP.NET > how to hide and unhide the particular frame in asp.net web page

how to hide and unhide the particular frame in asp.net web page

by Raghu S   on Mar 23, 2015   Category: ASP.NET  |  Views: 1108    |  Points: 5   |  Starter 
  Reply
Hi Everyone,
I have 2 frames in my webpage and if i click on the image button(hide) that particular frame must be hidden and vice-versa.

It would be great if anyone of you help me out with this.

Bookmark and Share:
 
  User Reply  | Ask a question  |   Reply 
  Re :how to hide and unhide the particular frame in asp.net web page   
by Altaf Ansari
on May 4 2015 10:37PM
Points : 10
Starter 
define each frame inside a separate <DIV></DIV> and set display:none; in inline div css on Image Button Click :

<DIV id="frame1" runat="server" style="display:none;"> <iframe src="XXX" ></iframe> </DIV>

<DIV id="frame2" runat="server" style="display:absolute;"> <iframe src="XXX" ></iframe> </DIV>


on Button Click:

if(frame1.style=="display:none;")
{
frame1.style="display:absolute;"
frame2.style="display:none;"
}
else
{
frame1.style="display:none;"
frame2.style="display:absolute;"
}

Recent Post

Latest Posts