473,779 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session variable is lost between ASP & ASP.NET pages

Hi folks,

I must be missing something here. I have an ASP page that I create a
Session variable in as follows.

Session ("name")="Jo e"

In an ASP.NET page in the same project and the same session, I call the
Session variable as follows:

Dim str As String
str = Session("name")

When I do a Response.Write (str), nothing writes to the screen.

Any thoughts on what is happening here would be appreciated
Mar 28 '06 #1
2 1446

Uhhhh....

Yeah , that is what it will do. It doesn't work like that.

You can check this out
http://www.asp101.com/articles/sidne...te/default.asp

but .... the thing surprising you, isn't surprising at all. They are
different technologies...
with nothing but the phrase "asp" in common.


"glenn" <gl***@discussi ons.microsoft.c om> wrote in message
news:16******** *************** ***********@mic rosoft.com...
Hi folks,

I must be missing something here. I have an ASP page that I create a
Session variable in as follows.

Session ("name")="Jo e"

In an ASP.NET page in the same project and the same session, I call the
Session variable as follows:

Dim str As String
str = Session("name")

When I do a Response.Write (str), nothing writes to the screen.

Any thoughts on what is happening here would be appreciated

Mar 28 '06 #2
re:
nothing but the phrase "asp" in common
Absolutely...

The seminal work on sharing session state between ASP and ASP.NET is :

"How to Share Session State Between Classic ASP and ASP.NET"
http://msdn.microsoft.com/library/de...rttoaspnet.asp


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"sloan" <sl***@ipass.ne t> wrote in message news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
Uhhhh....

Yeah , that is what it will do. It doesn't work like that.

You can check this out
http://www.asp101.com/articles/sidne...te/default.asp

but .... the thing surprising you, isn't surprising at all. They are
different technologies... with nothing but the phrase "asp" in common.


"glenn" <gl***@discussi ons.microsoft.c om> wrote in message
news:16******** *************** ***********@mic rosoft.com...
Hi folks,

I must be missing something here. I have an ASP page that I create a
Session variable in as follows.

Session ("name")="Jo e"

In an ASP.NET page in the same project and the same session, I call the
Session variable as follows:

Dim str As String
str = Session("name")

When I do a Response.Write (str), nothing writes to the screen.

Any thoughts on what is happening here would be appreciated


Mar 28 '06 #3

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

Similar topics

9
2993
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on their web pages. Let's say they both create the session variable $_SESSION. Each uses yo for a different purpose. Now we have a user accessing address.com. He goes to Bill's site and his session his started with the $_SESSION created.
5
4135
by: Marc Rivait | last post by:
Here is a very interesting scenario. I have a simple test application that loads a page and sets a session variable on the load event. On the first page there is a link to a second page. The load event of the second page displays the value of the session variable. The problem is that when I use a W2k machine, this little test works perfect. Session variable value is displayed on the second page. However, when I use my XPPro...
1
737
by: Werner | last post by:
Hi Patrick! Can you give an example of how to use a frameset inside an aspx-file? When I create a new frameset in Visual Studio.Net it just gives me a htm-File. Or give me a link where I can find one? Thanks Werner P.S. Somehow I did not manage to do a followup in Googles newsgroups.
3
1900
by: Welman Jordan | last post by:
Hello all, In Session_OnStart, I set a session variable: Session = DateTime.Now; and Session.Timeout = 15;
3
2614
by: William | last post by:
Hi I have an ASP.NET application that connects to an Access database. Everything works fine except for the Session object. Data in the session object is lost after I've made a call to the database. To test, I've created two test aspx pages. Test1.aspx contains two buttons. The first button sets values in the session object and then navigates to Test2.aspx. Test2.aspx only displays the values in the session object. The second button...
13
2860
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i visit again .... null ... again .... it works ..... again ... it works ... again ..... null....... and so on and on .... it does randomly work or not.... what is this effect?
0
2291
by: tharika_c | last post by:
Hi, We have a simple ASP.NET web application where one of the Session variables, called Session("SSO_ID") gets created and assigned a value (equal to the HTTP_HRID request variable value), inside the Session_Start event of the global.asax.vb file, since this variable is accessed by almost all the pages in the project. Besides this variable, there are other session variables which are set in the various aspx pages, as needed.
13
3071
by: SAL | last post by:
Okay, don't bash me to hard for my design on this app, it's my first web app and it's in production. My basic design is using Datatables created via the designer with a business logic class in between the datatable and ObjectDataSources. In one page I had a Gridview with select enabled. When an row in the grid is selected, I retrieve the SelectedValue, store the value in a Session variable and redirect the response to another web page,...
2
1417
by: sheldonlg | last post by:
I wanted to see if absolute or relative URLs had anything at all to do with the session variable information being lost. So, I wrote a simple test program. It is at www.sheldonlg.com/headertest/index.php. The results were not what I expected. BOTH ways lost the session information. All this test application does is call session_name to set a name. Then session_start. It prints out the name and dumps the session variables. It has two...
0
9474
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,...
0
10306
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
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
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
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...
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3632
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2869
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.