value of session variable is not stored...

K

keyser soze

this is unbeliveable...
i'm trying to set a session var "x"
from a local var "y"

....
session("x")= y
response.write( session("x") ) --> it outputs the content!
response.end --> stop here
....

but, i have another page that tells
the content of these session var...
amazingly it reports the OLD value of the session var....

unfortunately i can't reproduce it with a simple code like this
but i can't post all the code, includes, etc
i put "response.end" for ensure the processing stop there
i'm sure that there is no a double submit
that could overvrite the value....

please, i am desperated... and angry
any idea?

thanks
KS
 
B

Bob Barrows [MVP]

keyser said:
this is unbeliveable...
i'm trying to set a session var "x"
from a local var "y"

...
session("x")= y
response.write( session("x") ) --> it outputs the content!
response.end --> stop here
...

but, i have another page that tells
the content of these session var...
amazingly it reports the OLD value of the session var....

unfortunately i can't reproduce it with a simple code like this
but i can't post all the code, includes, etc
i put "response.end" for ensure the processing stop there
i'm sure that there is no a double submit
that could overvrite the value....

please, i am desperated... and angry
any idea?
Without showing us how to reproduce it, all we can do is point you here:
http://www.aspfaq.com/show.asp?id=2157
or
http://www.aspfaq.com/show.asp?id=2346
 
K

keyser soze

well, this is the code for setting the session var,
i can send more and more code
but the "key line" is only one
the value of "ASPLIB_state" is correct
.... all variables begining with "ASPLIB_" are public ...

sub ASPLIB_SaveState()
dim pin
pin= InStr(ASPLIB_state,"@"&ASPLIB_ScriptName)
if pin>0 then
ASPLIB_state= left(ASPLIB_state,pin-3)& mid(ASPLIB_state,pin+1+len(ASPLIB_ScriptName))
end if
dim fst
fst= ASPLIB_nvl( ASPLIB_finalState, 0 )
ASPLIB_state= ASPLIB_state& replace(space(1-fst\10)," ","0")& fst& "@"& ASPLIB_ScriptName
session("estado")= ASPLIB_state
' this is the format of ASPLIB_state --
"00@/inicio.asp00@/sec/inicio.asp00@/sec/ingreso.asp01@/sec/popfuente.asp"
end sub

The last number ( "01" , at the last ".asp" token in the string )
identifies the state of the page


thanks Bob


"keyser soze" <[email protected]> escribió en el mensaje
| this is unbeliveable...
| i'm trying to set a session var "x"
| from a local var "y"
|
| ...
| session("x")= y
| response.write( session("x") ) --> it outputs the content!
| response.end --> stop here
| ...
|
| but, i have another page that tells
| the content of these session var...
| amazingly it reports the OLD value of the session var....
|
| unfortunately i can't reproduce it with a simple code like this
| but i can't post all the code, includes, etc
| i put "response.end" for ensure the processing stop there
| i'm sure that there is no a double submit
| that could overvrite the value....
|
| please, i am desperated... and angry
| any idea?
|
| thanks
| KS
|
|
|
|
|
 
K

keyser soze

sorry Bob, i was wrong
Yes: there is a double submission

i do "submit" using a javascript function
could it be the reason for the double submission?
this is the code:

function jslib_post(uri,popup,close){
var dest= document.userform;
if(uri==null) uri= window.opener.location.href;
if(popup==null){
dest.target= "";
}else{
window.open("","popup", ...);
dest.target= "popup";
}
if(close){
window.opener.name= "mainwin";
dest.target= "mainwin";
}
dest.method= "post";
dest.action= uri;
dest.submit();
if(close) window.close();
return false;
}

i'm now testing with a direct, specific submission



"Bob Barrows [MVP]" <[email protected]> escribió en el mensaje
| keyser soze wrote:
| > this is unbeliveable...
| > i'm trying to set a session var "x"
| > from a local var "y"
| >
| > ...
| > session("x")= y
| > response.write( session("x") ) --> it outputs the content!
| > response.end --> stop here
| > ...
| >
| > but, i have another page that tells
| > the content of these session var...
| > amazingly it reports the OLD value of the session var....
| >
| > unfortunately i can't reproduce it with a simple code like this
| > but i can't post all the code, includes, etc
| > i put "response.end" for ensure the processing stop there
| > i'm sure that there is no a double submit
| > that could overvrite the value....
| >
| > please, i am desperated... and angry
| > any idea?
| >
| Without showing us how to reproduce it, all we can do is point you here:
| http://www.aspfaq.com/show.asp?id=2157
| or
| http://www.aspfaq.com/show.asp?id=2346
|
|
| --
| Microsoft MVP -- ASP/ASP.NET
| Please reply to the newsgroup. The email account listed in my From
| header is my spam trap, so I don't check it very often. You will get a
| quicker response by posting to the newsgroup.
|
|
 
K

keyser soze

Solved!!!! ...double submission!!!
thanks anyway, Bob !

i'm happy now :)

ASP is the best again !!

KS

"Bob Barrows [MVP]" <[email protected]> escribió en el mensaje
| keyser soze wrote:
| > this is unbeliveable...
| > i'm trying to set a session var "x"
| > from a local var "y"
| >
| > ...
| > session("x")= y
| > response.write( session("x") ) --> it outputs the content!
| > response.end --> stop here
| > ...
| >
| > but, i have another page that tells
| > the content of these session var...
| > amazingly it reports the OLD value of the session var....
| >
| > unfortunately i can't reproduce it with a simple code like this
| > but i can't post all the code, includes, etc
| > i put "response.end" for ensure the processing stop there
| > i'm sure that there is no a double submit
| > that could overvrite the value....
| >
| > please, i am desperated... and angry
| > any idea?
| >
| Without showing us how to reproduce it, all we can do is point you here:
| http://www.aspfaq.com/show.asp?id=2157
| or
| http://www.aspfaq.com/show.asp?id=2346
|
|
| --
| Microsoft MVP -- ASP/ASP.NET
| Please reply to the newsgroup. The email account listed in my From
| header is my spam trap, so I don't check it very often. You will get a
| quicker response by posting to the newsgroup.
|
|
 

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,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top