Jan 11, 2012, 5:12 PM
[CLOSED] Session expired into iframe
Hi,
When the session expires in an iframe, how do I redirect to a login page outside the iframe?
My context:
I have a base page, where all my other pages inherit.
This panel below is child of the index.aspx
How do I put the page index.aspx in the context and then redirect to login.aspx?
Thanks.
When the session expires in an iframe, how do I redirect to a login page outside the iframe?
My context:
I have a base page, where all my other pages inherit.
public abstract partial class PaginaBase : System.Web.UI.Page
{
private usuario usuario;
protected usuario Usuario
{
get
{
if (usuario == null)
usuario = (usuario)this.Session[Aplicacao.USUARIO_SESSAO];
return usuario;
}
}
protected override void OnInit(EventArgs e)
{
base.OnInit(e);
this.Load += new EventHandler(PaginaBase_Load);
}
protected void PaginaBase_Load(object sender, EventArgs e)
{
if (this.Session[Aplicacao.USUARIO_SESSAO] == null)
{
string url = this.Request.Url.Segments.LastOrDefault();
if (!url.Equals(Aplicacao.PAGINA_PRINCIPAL))
{
X.Js.Call("parent.location.href = self.document.location");
X.Js.Call("parent.reload()");
}
else
{
this.Response.Redirect("../Login/Login.aspx");
}
}
}
}
In my index.aspx page I inherit the basepage.aspx.This panel below is child of the index.aspx
<ext:Panel ID="PnlRecuperarDocumentoID" runat="server" Border="false" Title="Pesquisa de Documento" Layout="AbsoluteLayout" IconCls="icon-recuperardocumento" Height="300" Width="380" AutoScroll="true" >
<AutoLoad Url="../Forms/RecuperarDocumento.aspx" Mode="IFrame" ShowMask="true" MaskMsg = "Carregando ..." />
<Tools>
<ext:Tool Type="Refresh" Qtip="Recarregar página" Handler="#{PnlRecuperarDocumentoID}.reload();" />
</Tools>
</ext:Panel>
When the session expires in RecuperarDocumento.aspx the login page appears within RecuperarDocumento.aspx.How do I put the page index.aspx in the context and then redirect to login.aspx?
Thanks.
Last edited by Daniil; Jan 11, 2012 at 6:30 PM.
Reason: [CLOSED]