473,785 Members | 2,266 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

value of session variable is not stored...

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.e nd" 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

Jun 27 '08 #1
4 3087
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.e nd" 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.
Jun 27 '08 #2
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_sta te" is correct
.... all variables begining with "ASPLIB_" are public ...

sub ASPLIB_SaveStat e()
dim pin
pin= InStr(ASPLIB_st ate,"@"&ASPLIB_ ScriptName)
if pin>0 then
ASPLIB_state= left(ASPLIB_sta te,pin-3)& mid(ASPLIB_stat e,pin+1+len(ASP LIB_ScriptName) )
end if
dim fst
fst= ASPLIB_nvl( ASPLIB_finalSta te, 0 )
ASPLIB_state= ASPLIB_state& replace(space(1-fst\10)," ","0")& fst& "@"& ASPLIB_ScriptNa me
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" <ba*********@ho tmail.comescrib ió en el mensaje
news:u1******** ******@TK2MSFTN GP03.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.e nd" 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
|
|
|
|
|

Jun 27 '08 #3
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.userfo rm;
if(uri==null) uri= window.opener.l ocation.href;
if(popup==null) {
dest.target= "";
}else{
window.open("", "popup", ...);
dest.target= "popup";
}
if(close){
window.opener.n ame= "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]" <re******@NOyah oo.SPAMcomescri bió en el mensaje
news:O9******** ******@TK2MSFTN GP02.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.e nd" 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.
|
|

Jun 27 '08 #4
Solved!!!! ...double submission!!!
thanks anyway, Bob !

i'm happy now :-)

ASP is the best again !!

KS

"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcomescri bió en el mensaje
news:O9******** ******@TK2MSFTN GP02.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.e nd" 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.
|
|

Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8900
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns a empty value instead of returning the browser type. Here is the line which i am using in my code and from manual: <?php echo $_SERVER; ?>
3
2382
by: Arnaldo Martinez | last post by:
Hi, friends: I have an ASP page where an user enter a value and click the submit button. I want this value to be transfer to a session("temp") within the same page where I want to call it back from the same ASP page.
4
4629
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input type="checkbox" name="chk_Complete" value="<%Response.Write l_IsChecked%>"<%if cbool(l_IsChecked) then Response.Write " checked"%>> The code to captures the checkbox value in the asp page that builds the sql string is follows
3
7341
by: Michelle Stone | last post by:
hi al i have "variab1 = window.open ("a.aspx", "helloworld"); i do this inside a RegisterStartupScrict ("key", "<script language=javascript>******</script>"); where ***** is hte javascript comman i need to access variab1 from some other forms (to close it from another link from the parent's parent's parent's page). i figured out that the best way to do this is to store this javascript variable in a session variable now comes the...
5
1727
by: Andy G | last post by:
I have a registration page that captures 75% of the users data. After they enter that info they are redirected to one of two pages depending on how they answered a question on the registation page. My question is would it be better to store all of the fields(15 or so) from the first page in session variables and reference them from the next page and run ONE stored procedure OR would it be better to run a stored procedure the first page...
2
1751
by: Al Wilkerson | last post by:
Hey guys, I'm having problems with creating/storing a value in a session variable for later retrieving on another page. Here is the aspx page where I create/store the value <%Session="programming";%> <asp:HyperLink id="hlnkProgramming"Target="main" NavigateUrl="CategoryResults.aspx">Programming</asp:Hyperlink>
1
1232
by: tperri | last post by:
Hi everyone, I have an .aspx file that is used by an external program to perform a function. There is no code behind, all code and HTML is contained in one file. the structure is like this: <% string strBlah = Request.Querystring("jdkfsd"); string userid = Convert.ToString(HttpContext.Current.Session);
4
1534
by: Jon Paal | last post by:
I captured an arraylist into a session value but to display the current values, the page requires a postback or else it displays the prior version of the value. how do I force a post back automatically so I can always get the current value stored in the session object ?
17
7149
by: =?Utf-8?B?SmltIFJvZGdlcnM=?= | last post by:
I am trying to replace a huge chunck of code that currently I incorporate with an #Include directive. The program rarely has to flow through that code, so I thought it would be better if I used Server.Execute. I found I can pass data TO the called asp file by creating an HTML <input> and erading it after I get there. However, I also need to read back ONE variable that the called file must set. I cannot figuer out how to do that. My...
8
4200
by: YYZ | last post by:
I'm using asp, not asp.net. I've got some open ended questions that I was really hoping someone in here could answer, or direct me to some resources that will help me answer them on my own. First, the session object. When a new user comes to my site, asp creates a session object, and a session id on that object. That session id is sent back to the client and stored as a cookie(?) that can be used to identify a single user across...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9489
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10100
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.