Problems with accessing ASP.NET Session values in ASP

G

Guest

Hi!
I'm porting an ASP application to ASP.NET 1.1 and having problems with
accessing Session values in ASP that were created and initialized in ASP.NET
1.1.

For example, I added a variable in an ASP.NET pages Page_Load routine, C#:

Int32 Member = 12;
Session.Add("Member", U_Member.ToString());

When I try to access it in an ASP page as follows:

<%
Dim Member
U_Member = Session("Member")
%>

U_Member is empty!

Can any one help me on this!

/Thanks
 
K

Konstantinos Pantos

I think that you've got your variables wrong.
Int32 Member = 12;
Session.Add("Member", U_Member.ToString());
Shouldn't the last statement be:
Session.Add("Member", Member.ToString())?
If so then retreiving the Member parameter from session object will return
"12".
Hope this helps

K#
 
G

Guest

You can't. ASP and ASP.Net share different memory spaces. The best you can do
is to come up with some other scheme to share session values. i.e. as a
common database table, pass in querystrings, etc..

We've done this on a number of apps and it's a pain but it does work.

John Stemper
 

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,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top