473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

sharing cookies between asp and asp.net

I have a project that contains asp and .net.
..NET is supposed to receive a cookie from classic ASP.

The problem is that my aspx page doesn't seem to recognise the cookie
that it's supposed to receive from classic asp. I receive the line NO
COOKIE.
Please someone help.

ASP code:
<%
If Not Request.Form("Name") = "" Then
Response.Cookies("Name") = Request.Form("Name")

end if
%>
<HTML>

ASPX code:

Imports System.Web.HttpCookie

PAGE_LOAD
IF PAGE.ISPOSTBACK THEN
If Request.Cookies("Name") Is Nothing Then
Label1.Text = "NO COOKIE"
Else
Dim cookie As HttpCookie
cookie = New HttpCookie("name")
cookie.Value = Request.Cookies("Name").Value()
Response.AppendCookie(cookie)
Label1.Text = "Cookie already exists : "
Label1.Text = Label1.Text &
Request.Cookies("Name").Value()

End If
EnD IF
Nov 17 '05 #1
3 1781
"collie" <ka********@hotmail.com> wrote in message
news:96**************************@posting.google.c om...
I have a project that contains asp and .net.
.NET is supposed to receive a cookie from classic ASP.

The problem is that my aspx page doesn't seem to recognise the cookie
that it's supposed to receive from classic asp. I receive the line NO
COOKIE.


How do you get from your ASP page to your ASP.NET page.
--
John
Nov 17 '05 #2

I use <form method=post action="page1.aspx">
The asp contains a submit button.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3
in which case your
IF PAGE.ISPOSTBACK THEN
statement will return false going from your asp page to your aspx page

"collie nagar" <ka********@hotmail.com> wrote in message
news:Oh**************@TK2MSFTNGP10.phx.gbl...

I use <form method=post action="page1.aspx">
The asp contains a submit button.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 17 '05 #4

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

Similar topics

2
by: PeteZ | last post by:
Hi, I was of the understanding that Session variables were GLOBALLY scoped across all Applications on a specific web site and that data obtained and stored in "variables" were available for...
3
by: Hardik Shah | last post by:
Hi, I am calling an ASP.Net page from an ASP classic application but need the .Net page to have access to ASP classic's session variables. I am using HTTPWebRequest to call ASP classic page...
10
by: Suresh | last post by:
how to share Session Sharing Across the domain
0
by: Nabani Silva | last post by:
Hi, hope someone could help I need to share session state (and contents) through differente web applications. I'm trying to get it done by using StateServer session state, below I paste code...
1
by: AnthonyC | last post by:
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application. When user log onto the application, an in-memory (per-session)...
6
by: matt | last post by:
hello, i am having trouble doing something. when a user triggers a certain event in my app, i need to initiate another web request to one of my other webpages, programmatically. currently, i do...
3
by: Ben Holness | last post by:
Hi all, I have a php/mysql website where people can upload their own graphics for the buttons and background of pages on the website. This used to run on one server, but I have now been asked...
0
by: OG | last post by:
Hello, I would like to share cookies across various web based apps, and from what I understand your apps can do this as long as they all belong to the same domain. For example app1.mydomain.com...
1
by: rehanfarha | last post by:
Hi All We have two applications say A and B and both are deployed on different servers. If user has to access B application then user has to login in A application and then user will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...

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.