Asp.net jumps out of the iframe structure and redirects to logon. asp. netiframe
We often need to process web programming. When the session expires, we need to jump to the login page for users to log on, because we may use the IFrame framework, therefore, our login page needs to be displayed on the entire page, rather than an IFrame. Most netizens use the following code for implementation.
Write the following code in the filter:
PrintWriter out = response. getWriter (); out. write ("<script> window. parent. location. href = 'login. jsp '</script> ");
My implementation method is as follows: Jump to an action, let the action decide the page to jump to, and then write the code on the login page
<Script language = "JavaScript"> // determines whether the current window has a top-level window. If yes, the address bar of the current window changes, // This will display the function loadTopWindow () {if (window. top! = Null & window.top.doc ument. URL! = Document. URL) {window. top. location = document. URL ;}</script>
Reference: https://www.cnblogs.com/jiandankuaile/p/7799856.html