session

G

Guest

Dear All

I have this command in ASP.NET 2.0
session("test")="hello"

I’m trying to retrive the seesion vale for onather web form using this command
Dim a as string=ctype(Session.item(“testâ€),string)
But always giving me empty value .NO error message
I tried also
Dim a as string=session(“testâ€) but same problem

Please can anyone help
 
L

Laurent Bugnion

Hi,
Dear All

I have this command in ASP.NET 2.0
session("test")="hello"

I’m trying to retrive the seesion vale for onather web form using this command
Dim a as string=ctype(Session.item(“testâ€),string)
But always giving me empty value .NO error message
I tried also
Dim a as string=session(“testâ€) but same problem

Please can anyone help

Does your web application have a Global.asax? If Global.asax is not
added to your application, session management is not done properly. In
1.1, it was present by default, but in 2.0 it's not anymore.

See this:
http://geekswithblogs.net/lbugnion/archive/2006/10/11/93737.aspx

This is also true for web applications.

1) Add new item / Global Application Class
2) To force the cached version to be updated, add the Session_Start
event handler like I describe in the blog entry above, set a breakpoint
in it, and make sure that the SessionID is consistent in every call.

Greetings,
Laurent
 

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,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top