• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1038
  • Last Modified:

on session expire in iframe - open login page in parent window


hi there,

how do i open the login page in parent window on session expires in iframe.

I use vb. net and asp.net 3.5

Thanks
Nitesha
0
Redshelf
Asked:
Redshelf
1 Solution
 
Jini Jose.Net Team LeadCommented:
if your iframe source is test.aspx, then in the page load, you can check the session and if it expires you can do the below.
            Page.RegisterStartupScript("ToLogin","<script language='javascript'>window.parent.location.href=\"http://localhost:2672/ShowPage.aspx?Id=9\";</script>");

Open in new window

0
 
RedshelfAuthor Commented:
hi

above solution did not work for me.

i have copied the followinbg code in my login page and it worked.

<SCRIPT LANGUAGE=JavaScript>
<!--
  if (top.frames.length!=0)
   top.location=self.document.location;
// -->
</SCRIPT>


0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now