陈建华秘书卢一先:Html框架结构下的页面跳转

来源:百度文库 编辑:九乡新闻网 时间:2024/10/04 04:46:14


  
  
      
   
   
  



Header.aspx:


                                        当前登录用户:
                                   

                                   

                                     
                                   
                                   

protected void BtnExit_Click(object sender, EventArgs e)
    {
        Response.Write("");
    }

向页面弹出提示后,跳转到其他页面

StringBuilder Builder = new StringBuilder();
        Builder.Append("");
        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "",Builder.ToString());

********************下面也是框架嵌入iframe,当用户session丢失时的跳出框架**************

  


           
               
           
              
           
               
           
          
       

            
                               
                                   
                                                              
                           

                                   

                                   
                                   

                                        

                                                                                             runat="server" onclick="ImageButtonPWD_Click" />
                                                                                             runat="server" OnClientClick="return confirm('确认退出网站后台管理吗?');"
                                                 onclick="ImageButtonESC_Click" />
                                        

                                    

                                   

   
               
>
                   
                       
                        
                           
                           
                           
                       
                   

                                                               
                   
                            

                               
                           

                                                               
                   
                           

               
               

在Global.asax中

void Application_Error(object sender, EventArgs e)
    {
        //在出现未处理的错误时运行的代码
        Exception ex = Server.GetLastError();
        if (ex.InnerException is SessionOutException)
        {
            Response.Redirect("~/Admin/SessionOut.html", true);
        }
        else
        {
            Response.Redirect("~/Admin/UnKnown.html", true);
        }       
    }

SessionOut.html
       

//写在报错页面上