Problem with iframes

A

Ashish

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
 
C

Cowboy \(Gregory A. Beamer\)

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!
**********************************************************************
 
A

Ashish

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
 

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,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top