|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
session variables
<i><b>Originally posted by : sam duncan (sam.duncan@caradon.com)</b></i><br /><br />ok, please help.<br /><br />if i create a session variable in page1.asp like this:<br /><br />Session("myName")="Sam"<br /><br />and try to read it from page2.asp like this:<br /><br />Response.Write ("Name is = " &Session("myName"))<br /><br />why is it blank?<br /><br />I have spent all day, playing with arrays, collections etc, if I access the variable from within the same page, ie: page1.asp or the global.asa page its ok, I have also noticed the Sub Session_OnStart is called in the global.asa page every time I log into a page, regardless if I am currently in a session, this doesnt seam right, as i thought the Sub Session_OnStart was only called once per session?<br /><br />Please help! I am only just beginning asp and really need to get my head around this so i can begin persisting and sharing data amoungst single user sessions and multiple users.<br /><br />Thanks in anticipation!<br /><br />Sam x<br /><br /> <br />
|
|
#2
|
|||
|
|||
|
<i><b>Originally posted by : Gerhard (wentink@webset.nl)</b></i><br /><br />Be sure that your web is an application. In IIS 5: Right click the web in a management console, choose "properties" and click Create.<br /><br />------------<br />sam duncan at 9/14/2000 10:38:47 AM<br /><br /><br />ok, please help.<br /><br />if i create a session variable in page1.asp like this:<br /><br />Session("myName")="Sam"<br /><br />and try to read it from page2.asp like this:<br /><br />Response.Write ("Name is = " &Session("myName"))<br /><br />why is it blank?<br /><br />I have spent all day, playing with arrays, collections etc, if I access the variable from within the same page, ie: page1.asp or the global.asa page its ok, I have also noticed the Sub Session_OnStart is called in the global.asa page every time I log into a page, regardless if I am currently in a session, this doesnt seam right, as i thought the Sub Session_OnStart was only called once per session?<br /><br />Please help! I am only just beginning asp and really need to get my head around this so i can begin persisting and sharing data amoungst single user sessions and multiple users.<br /><br />Thanks in anticipation!<br /><br />Sam x<br /><br /> <br />
|
|
#3
|
|||
|
|||
|
<i><b>Originally posted by : Doug Hagerman (DougH@Usbs-Panels.com)</b></i><br />Ok, I am stuck with the same Session variable problem from page to page.<br /><br />I set it on one page, and on the next it is blank.<br /><br />I have even made sure the Folders are recorded as applications as previously suggestion in this comment session.<br /><br />So any other clues someone can give me?<br /><br />Thanks,<br />Doug<br /><br /><br /><br />------------<br />Gerhard at 9/16/2000 12:17:31 AM<br /><br /><br />Be sure that your web is an application. In IIS 5: Right click the web in a management console, choose "properties" and click Create.<br /><br />------------<br />sam duncan at 9/14/2000 10:38:47 AM<br /><br /><br />ok, please help.<br /><br />if i create a session variable in page1.asp like this:<br /><br />Session("myName")="Sam"<br /><br />and try to read it from page2.asp like this:<br /><br />Response.Write ("Name is = " &Session("myName"))<br /><br />why is it blank?<br /><br />I have spent all day, playing with arrays, collections etc, if I access the variable from within the same page, ie: page1.asp or the global.asa page its ok, I have also noticed the Sub Session_OnStart is called in the global.asa page every time I log into a page, regardless if I am currently in a session, this doesnt seam right, as i thought the Sub Session_OnStart was only called once per session?<br /><br />Please help! I am only just beginning asp and really need to get my head around this so i can begin persisting and sharing data amoungst single user sessions and multiple users.<br /><br />Thanks in anticipation!<br /><br />Sam x<br /><br /> <br />
|
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > session variables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|