Problem with iframes

Discussion in 'ASP .Net' started by Ashish, Feb 27, 2004.

  1. Ashish

    Ashish Guest

    Hi All,
    I have a main page that contains an iframe. Depending upon tab control
    selection, I load several different aspx pages (from the same app) to the
    iframe. My parent sets data in the session variable. The page in the iframe
    is unable to access the session object (shows null). My guess is that the
    dll is loaded twice as asp.net loads another instance of dll in the iframe.
    Interestingly in another scenerio I am playing with modal dialogs and set
    data in session object and upon closing modal dialog my parent ie window
    gets the data. I load the page in the modal dialog via javascript. In this
    case why doesnt asp.net load another instance of dll ? Any way to get around
    the iframe problem?
    Thanks
    Ashish
     
    Ashish, Feb 27, 2004
    #1
    1. Advertising

  2. Pages in IFrame in the same app? If the IFrame pages come from another app,
    you will not share session unless you have the keys set identically and, if
    using forms auth, have the same forms auth cookie name. Best to put the ASPX
    pages in the same app.

    Is the IFrame on page1 of the app? The firing of events may be the problem.
    As a cheap way of setting this, you can have the first page create any
    session objects and redirect to the IFRAME holding page.

    One more question? The page in the IFRAME is ASPX, is the page outside of
    the IFRAME ASP or ASPX? If ASP, they have different sessions. There is an
    article on MSDN.microsoft.com that tells how to share session in ASP and
    ASPX:
    http://msdn.microsoft.com/library/en-us/dnaspp/html/converttoaspnet.asp

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
    "Ashish" <> wrote in message
    news:uGNtcBQ$...
    > Hi All,
    > I have a main page that contains an iframe. Depending upon tab control
    > selection, I load several different aspx pages (from the same app) to the
    > iframe. My parent sets data in the session variable. The page in the

    iframe
    > is unable to access the session object (shows null). My guess is that the
    > dll is loaded twice as asp.net loads another instance of dll in the

    iframe.
    > Interestingly in another scenerio I am playing with modal dialogs and set
    > data in session object and upon closing modal dialog my parent ie window
    > gets the data. I load the page in the modal dialog via javascript. In this
    > case why doesnt asp.net load another instance of dll ? Any way to get

    around
    > the iframe problem?
    > Thanks
    > Ashish
    >
    >
     
    Cowboy \(Gregory A. Beamer\), Feb 27, 2004
    #2
    1. Advertising

  3. Ashish

    Ashish Guest

    Hi Gregory,
    I think I didnt make myself much clear. The problem is:

    1. I have one ASP.NET application (no classic asp) and it has a main page
    (i.e. kinda SDI main window)
    that contains an IFrame.

    2. I load different ASPX pages (that belong to the same ASP.NET project) in
    that iframe.

    3. The session variables are set by my business objects (again belong to the
    same project).

    4. The page that loads in the iframe tries to access the session object but
    finds it null !!!

    Thanks
    Ashish

    "Cowboy (Gregory A. Beamer)" <> wrote in
    message news:OuLrVtT$...
    > Pages in IFrame in the same app? If the IFrame pages come from another

    app,
    > you will not share session unless you have the keys set identically and,

    if
    > using forms auth, have the same forms auth cookie name. Best to put the

    ASPX
    > pages in the same app.
    >
    > Is the IFrame on page1 of the app? The firing of events may be the

    problem.
    > As a cheap way of setting this, you can have the first page create any
    > session objects and redirect to the IFRAME holding page.
    >
    > One more question? The page in the IFRAME is ASPX, is the page outside of
    > the IFRAME ASP or ASPX? If ASP, they have different sessions. There is an
    > article on MSDN.microsoft.com that tells how to share session in ASP and
    > ASPX:
    > http://msdn.microsoft.com/library/en-us/dnaspp/html/converttoaspnet.asp
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > **********************************************************************
    > Think Outside the Box!
    > **********************************************************************
    > "Ashish" <> wrote in message
    > news:uGNtcBQ$...
    > > Hi All,
    > > I have a main page that contains an iframe. Depending upon tab control
    > > selection, I load several different aspx pages (from the same app) to

    the
    > > iframe. My parent sets data in the session variable. The page in the

    > iframe
    > > is unable to access the session object (shows null). My guess is that

    the
    > > dll is loaded twice as asp.net loads another instance of dll in the

    > iframe.
    > > Interestingly in another scenerio I am playing with modal dialogs and

    set
    > > data in session object and upon closing modal dialog my parent ie window
    > > gets the data. I load the page in the modal dialog via javascript. In

    this
    > > case why doesnt asp.net load another instance of dll ? Any way to get

    > around
    > > the iframe problem?
    > > Thanks
    > > Ashish
    > >
    > >

    >
    >
     
    Ashish, Feb 27, 2004
    #3
    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. Ashish

    problem with iframes

    Ashish, Feb 27, 2004, in forum: ASP .Net
    Replies:
    8
    Views:
    496
    Marina
    Feb 27, 2004
  2. Diego F.

    Problem communicating iframes

    Diego F., Jun 15, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    372
    Diego F.
    Jun 15, 2005
  3. =?Utf-8?B?T2xlZw==?=
    Replies:
    8
    Views:
    9,354
    saket101083
    Aug 24, 2007
  4. Onson
    Replies:
    12
    Views:
    569
  5. Jarrod
    Replies:
    14
    Views:
    744
    SpaceGirl
    Aug 9, 2004
Loading...

Share This Page