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

Discussion in 'ASP .Net' started by Paul, Jun 17, 2008.

  1. Paul

    Paul Guest

    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.
    Paul, Jun 17, 2008
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Noel Dolan
    Replies:
    0
    Views:
    216
    Noel Dolan
    Jul 18, 2004
  2. Replies:
    1
    Views:
    239
  3. Spammay Blockay
    Replies:
    1
    Views:
    401
    Dietmar Meier
    Feb 4, 2005
  4. Replies:
    4
    Views:
    182
    kaeli
    Mar 15, 2005
  5. Bitswapper
    Replies:
    5
    Views:
    119
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page