Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

In my one page, i put iframe(client side) in my page (details.aspx). I am changing iframe source from my javascript function. when session timeou occure, my page which shows in iframe is redirect to login page. I need to redirect details.aspx to login.aspx.

I am using custom role management in my site. I tried to call below code. but javascript can't call at that time.

protected void Page_PreInit(object sender, EventArgs e)
{
    if (HttpContext.Current.Session["AccountID"] == null)
    {
        ScriptManager.RegisterStartupScript(this, this.GetType(), "redirect", "parent.location='login.aspx'", true);

    }
}


can anyone had face this problem? any proper solution for this problem?
Posted

1 solution

 
Share this answer
 
Comments
adkalavadia 21-Oct-10 3:42am    
hi suthish,

thanks for reply. script is working for me.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900