sharing cookies between asp and asp.net

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
 
J

John Saunders

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.
 
C

collie nagar

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

Tim T

in which case your
IF PAGE.ISPOSTBACK THEN
statement will return false going from your asp page to your aspx page
 

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

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top