How to preserve the history page: IFRAME page apply

Source: Internet
Author: User
    Retention History Page Implementation method: IFRAME page apply   One, parent page Setup 1, aspx page (1) Add JavaScript function <script language= " JavaScript "type=" Text/javascript >   //Setting IFRAME    function Showlayer ()    { & nbsp;  document.all.myformlayer.style.display= ';     document.all.parentformlayer.style.height=0;     return false;   } </script>   (2) include existing pages in Div, under form, note that this part of the control must not set the Height property <div id= "Parentformlayer" runat= "Server" > ... </div>   (3) New Div and IFrame         < for displaying subordinate subpages Div id= "Myformlayer" runat= "Server" visible= "false" >              <iframe scrolling= "no" frameborder= "0" width= "100%" height=800 id= "IFRAME1" runat= "Server" >  & nbsp;          </iframe>          </div>   2, Aspx.cs code (1) Add squareMethod     public static void Createscript (System.Web.UI.Page mypage, String strscript, string ID)      {        string strscript = "<script language= ' JavaScript ' >";  & nbsp;      Strscript + = Strscript;         Strscript + = "</script>";           ClientScriptManager CSM = mypage. ClientScript;           if (!CSM. IsStartupScriptRegistered (ID))         {             CSM. RegisterStartupScript (MyPage. GetType (), ID, strscript);        }    }   (2) Add code in Event of link button          myformlayer.visible = true;         IFRAME1. Attributes.Add ("src", "p2w4.aspx");//P2w4 for the jump page, you can add parameters        Createscript (Page, "Showlayer ();", "show");   (3) Add code//clear IFRAME1 properties to the Page_Load () event to avoid events raised by other keystrokes with the page defined by SRC         IFRAME1. attributes["src"] = null;   II, sub-page settings 1, aspx page: no special settings.   2, Aspx.cs code (1) adds Code Response.Write ("<script>parent") to the event that returns the key. MyFormLayer.style.display = ' None ';</script> ');  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.