Thanks for reading. I'm having problems with cookies from asp to asp.net
and back!
It seems like I can set a cookie in asp.net fine, and alter it at will, as
soon as asp touches it, asp.net won't have anything to do with it. Can
someone please help!
The code below, going from aspx to aspx, works great the cookie as expected
goes from qwerty to zxcvb and back. As soon as you hit the asp page, the
cookie goes to asdfg and stays there no matter how many times you hit it
from the aspx pages afterwards.
Please help! I really want to transition slowly to .net, this will hamper
my ability to do that...
Thanks,
Ben
[fooo.aspx.cs]
private void Page_Load(objec t sender, System.EventArg s e)
{
if (Request.Cookie s["Test"] != null &&
Request.Cookies["Test"]["Testing"] != null)
{
Response.Write( Request.Cookies["Test"]["Testing"]);
}
Response.Cookie s["Test"]["Testing"] = "qwerty";
Response.Write( "<br><a href=\"fooo2.as px\">zxcvb</a>");
Response.Write( "<br><a href=\"foo2.asp \">asdfg</a>");
}
[fooo.aspx.cs]
[fooo2.aspx.cs]
private void Page_Load(objec t sender, System.EventArg s e)
{
if (Request.Cookie s["Test"] != null &&
Request.Cookies["Test"]["Testing"] != null)
{
Response.Write( Request.Cookies["Test"]["Testing"]);
}
Response.Cookie s["Test"]["Testing"] = "zxcvb";
Response.Write( "<br><a href=\"fooo.asp x\">qwerty</a>");
}
[fooo2.aspx.cs]
[foo2.asp]
<%
Response.Write( Request.Cookies ("Test")("Testi ng"))
Response.Cookie s("Test")("Test ing") = "asdfg"
Response.Write( "<br><a href=""fooo.asp x"">qwerty</a>")
Response.End()
%> 0 1204 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sarah Michael |
last post by:
Hi,
I am running the following code to set a cookie but it is not working,
please
help me sorting out the problem. The code is from an online article
http://www.devarticles.com/art/1/639
I am using Windows 2000 SP5, PHP 4.2.3, MYSQL 4.0.13-nt, apache 2.0.45
|
by: |
last post by:
I''m having a problem with cookies that is driving me insane :).
- If a user comes to http://domain.com and a cookie is set for them, then the user for whatever reason jumps to http://www.domain.com one of the 2 happens:
1) The cookie we set can not be read (expected), but then a new one can not be written ether (I looked at the server headers and although the cookie information is sent, IE ignores it).
2) The cookie from...
|
by: Stephanie Stowe |
last post by:
Hi. I read in some helpful publication
"If a cookie created by a page on catalog.acme.com sets its path attribute
to "/" and its domain attrinute to "acme.com", that cookie is available to
all web pages on catalog.acme.com or to any other server." (JavaScript The
Definitive Guide" O'Reilly)
This is exactly what I am trying to acheive. So I set about to test it.
I have a test server on my network. I went into my host file and pointed...
|
by: Ann and John |
last post by:
I understand the limitation of Cookies and how they are written and
retrieved - but
Is it possible, without client input, to have Cookie Data sent back to be ie
Visitor 1 has visited 25 times
Visitor 2 has visited 20 etc etc ?
All this to take place in the background without the clients having any
input....
|
by: slim |
last post by:
hi all,
whilst creating a mock-up site, i am trying to follow the rules and
guidelines i have been digesting over the last few months with regards to
css positioning and accessibility.
well, i know the journey is far from over and i'm using this mock-up as a
learning process.
the problem stumping me at the moment can be seen here:
| |
by: Eric |
last post by:
Visual C++ 2005 Express
MVP's and experience programmer's only please!...
I need to get the number of lines in a textbox so I can insert them into a
listview. The text comes from my database and is unformatted. I display the
text to my user in the listview. The textbox I create logically in the
program, and I initialize the correct properties for a normal multiline
editor.
|
by: ii2o |
last post by:
Hi all,
I'm trying to develop a website that selects from 3 stylesheets
depending on which style they have chosen. Their preference is stored
in a cookie and this is where the problems begin. I have boiled my code
down to the bare essentials in the hope that someone can help me with
this problem. I would be grateful if you could explain what I have done
is wrong too, because I read that cookie settings should be done before
the...
|
by: rodmc |
last post by:
Hi, I am trying to set a cookie on a client computer using the Cookie
module however all I get is the text being printed in the browser
window. Can anyone point me in the right direction so that the cookie
data is set without it appearing in the browser? A shortened version
of the code is below, in the full version there is also userID check,
this seems to work ok. I have removed that portion for the time being
as its the writing part that...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
|
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...
| |
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,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| | |