Connecting Tech Pros Worldwide Forums | Help | Site Map

value of session variable is not stored...

keyser soze
Guest
 
Posts: n/a
#1: Jun 27 '08
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





Bob Barrows [MVP]
Guest
 
Posts: n/a
#2: Jun 27 '08

re: value of session variable is not stored...


keyser soze wrote:
Quote:
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.


keyser soze
Guest
 
Posts: n/a
#3: Jun 27 '08

re: value of session variable is not stored...


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" <bajopalabra@hotmail.comescribió en el mensaje
news:u1ojpcEvIHA.1772@TK2MSFTNGP03.phx.gbl...
| 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
|
|
|
|
|

keyser soze
Guest
 
Posts: n/a
#4: Jun 27 '08

re: value of session variable is not stored...


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]" <reb01501@NOyahoo.SPAMcomescribió en el mensaje
news:O94qMmEvIHA.4492@TK2MSFTNGP02.phx.gbl...
| 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.
|
|

keyser soze
Guest
 
Posts: n/a
#5: Jun 27 '08

re: value of session variable is not stored...


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

i'm happy now :-)

ASP is the best again !!

KS

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcomescribió en el mensaje
news:O94qMmEvIHA.4492@TK2MSFTNGP02.phx.gbl...
| 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.
|
|

Closed Thread