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.
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.