Response.Write("<SCRIPT LANGUAGE=JScript>parent.main.location.href='main.aspx';</SCRIPT>");
//main为父窗体!

解决方案 »

  1.   

    public static void RefreshParentPageFrame( Page page, string frameName )
    {
    StringBuilder StrScript = new StringBuilder(); 
    StrScript.Append( "<script language=javascript>" );
    StrScript.Append( "parent.frames(\""+ frameName +"\").document.location.reload();" ); 
    StrScript.Append( "</script>" );
    if ( ! page.IsStartupScriptRegistered( "scriptName" ) )
    {
    page.RegisterStartupScript( "scriptName", StrScript.ToString() );
    }
    }
    #endregion在后置代码中调用:RefreshParentPageFrame( this, "父页帧名" );
      

  2.   

    Response.Write("<SCRIPT LANGUAGE=JScript>window.open('yourmainpage.aspx','mainframe');</SCRIPT>");
      

  3.   

    Response.AppendHeader("Refresh","0");搞定
      

  4.   

    Response.Write("<SCRIPT LANGUAGE=JScript>window.parent.location.reload(true);</SCRIPT>");