sharing cookies between asp and asp.net

  • Thread starter Thread starter collie
  • Start date Start date
C

collie

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
 
collie said:
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.
 
in which case your
IF PAGE.ISPOSTBACK THEN
statement will return false going from your asp page to your aspx page
 
Back
Top