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

P

Paul

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<structRepo> linksDataRepository;//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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top