467,116 Members | 1,140 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,116 developers. It's quick & easy.

tell if child window is open in code behind parent window-web app

Hi just wondering if anyone knows if there is a way to tell if a child window
is still open in the code behind in the parent window (web application vs.net
2005)? I have a web app and am using the following to add an attribute to
the body tag,
body.Attributes.Add("onunload",
"opener.location.href=opener.location.href;"); . This causes the parent page
to reload anytime the child page has a post back event or closes. Also I am
getting an error when trying to grab data in the parent page from the child
page (saved in session variable). The error is (unnable to cast object to
type system.collections.generic.list'[parent page]to
System.collections.generic.list[child page]). This error is occuring on the
parent page, line
linksDataRepository = (List<structRepo>)Session["linksDataRepository"];
where List<structRepolinksDataRepository;//generic list of type structRepo
and for structRepo which is just a structure I have
public struct structRepo
{
public Int32 icount;
public String url;
public String abspath;
public String description;
}
I have structRepo and linksDataRepository defined the same on both the child
and parent page. The linksDataRepository list is filled and saved to a
session variable in the child page.

Thanks
Paul G
Software engineer.
Jun 27 '08 #1
  • viewed: 1389
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

By using this site, you agree to our Privacy Policy and Terms of Use.