|
-
Dec 4th, 2004, 12:22 AM
#1
Thread Starter
New Member
session variables
Hey guys,
I'm pretty knew in the web paradigm, and my big problem so far has been the session variables. They got lost for any apparently reason , and i'm saying that because when i debug the variable gets fill before to pass to the other page, but when i check the other page the value is null.
do any of you guys have any pointer?
sincerely
Ben
ps merry christmas !
-
Dec 4th, 2004, 12:58 AM
#2
PowerPoster
Re: session variables
Well not sure what actually happensin your code, though just wanted to let you know, a new session variable is created each time you make some sort of a spelling mistake.
for ex: session("MyLoginVar") and Session("MLoginVar") would be 2 variables giving you no error msges.
-
Dec 4th, 2004, 01:12 AM
#3
Thread Starter
New Member
Re: session variables
hey thanks, but believe me I checked that more than one time, and I actually have a code like this
private sub AddtoSession(byval name as string,item as object)
if not session(name) then session.remove(name)
session.add(name,item)
end sub
-
Dec 6th, 2004, 02:01 AM
#4
PowerPoster
Re: session variables
I know that was dumb suggestion, but anyways i said it, becoz its sometimes we tend to make some really silly mistakes. no offence
now what can coz the session varibles to get "destroyed"....maybe
1. U are calling session.abandon?
2. too long idle time between pages and so the session ends
3. pages moving between "different" applications
well just a few more guesses.
-
Dec 11th, 2004, 06:28 PM
#5
Addicted Member
Re: session variables
From my experience sessionstate in vb.net is a bit buggy.
Are you using frames ? Frames & session variables do not mix too well. Response.redirect also may sometimes cause a session to drop.
The session also only exists for a single browser instance, so if you are redirecting to a new browser instance then the session will get lost.
Do you have anymore explanation on what your code is doing ?
-
Dec 13th, 2004, 11:11 AM
#6
Banned
Re: session variables
Everytime you rebuild your project / solution the proper dll files "change"
therefore session state is dead. Try it out for yourself open two browsers. In one compile your project and try then clicking something on your other browser open. You will notice that the session state has vanished. You can properly handle this via checking session state in the load event of your code, and redirect when necessary.
This is a common problem that I too faced when I first started.
Jon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|