Forums

ASP

This topic is locked

Maintaining State

Posted 10 Feb 2005 20:28:20
1
has voted
10 Feb 2005 20:28:20 David Stoltz posted:
If I have a value saved in session("myvalue", how can I "maintain state" when I click a link that has target="_blank" ???

The new window that pops up apparently has a new session id....

Any suggestions?

thanks

MMCP

Replies

Replied 10 Feb 2005 20:44:48
10 Feb 2005 20:44:48 Vince Baker replied:
A session variable will work from the directory it is created downwards...All child folders of the initial folder where the session was created will inherit and be able to use that session:

Example:


/siteroot/index.asp (if this is where the session is created)

/Siteroot/popups/file.asp ' Will inherit the session variable as it is contained within the same parent folder siteroot/

Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 10 Feb 2005 20:51:59
10 Feb 2005 20:51:59 David Stoltz replied:
I kind of thought it should....but for some reason, it's not...the folder where it's loosing the session is 1 folder down from where it was created (on the root)...

I am using IIS 6, is there something I can check to see if it's a setting thing?

What could be wrong?

Thanks!

BY THE WAY - I know the session is changing in the new window....I did a :
response.Write session.SessionID in both the original and new window - and value is different...

Edited by - dstoltz on 10 Feb 2005 20:56:11
Replied 10 Feb 2005 21:14:33
10 Feb 2005 21:14:33 David Stoltz replied:
I found out why...

The folder below it is defined as an "application" in IIS....thus it won't share session values with folders above it...

Thanks!

MMCP

Reply to this topic