473,772 Members | 3,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is different between Request.Cookie and Response.Cookie

ad
What is different between Request.Cookie and Response.Cookie ?
Are they independent?
Jan 27 '06 #1
2 5276
Request.Cookie is used to get the cookies sent from the browser.
Response.Cookie is used to store new cookies onto the browser. Follows the
same paradism as all other Request/Response things. request gets informaiton
about the http request, response is used to out put in response to the
request.

Karl

--
http://www.openmymind.net/

"ad" <fl****@wfes.tc c.edu.tw> wrote in message
news:es******** ******@TK2MSFTN GP12.phx.gbl...
What is different between Request.Cookie and Response.Cookie ?
Are they independent?

Jan 27 '06 #2
The difference is the difference between Request and Response. When any HTML
document is requested by a browser client, the headers sent from the client
contain all cookies for the domain of the HTML document, so that the server
can read them. When the Response is sent back to the client, the cookies are
included in the Response. The client then updates its cookies from the
Cookie Collection sent with the Response.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Who is Mighty Abbott?
A twin turret scalawag.

"ad" <fl****@wfes.tc c.edu.tw> wrote in message
news:es******** ******@TK2MSFTN GP12.phx.gbl...
What is different between Request.Cookie and Response.Cookie ?
Are they independent?

Jan 27 '06 #3

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

Similar topics

4
4105
by: CJM | last post by:
I have an ASP page that lists files and folders in a directory. I'm using a cookie to record the last time this page was visited, and I intend to show links that are created/modified from that date minus 30mins to the present... eg effectively new and modified files: If DateDiff("n", subfolder.DateLastModified, sLastVisit ) < 30 Then.... etc On my test machine this mechanism works OK, but on the live server (Win2k, IIS5) I get some...
2
3659
by: mark4asp | last post by:
Hello, I'm running my script locally and the cookie has been saved on the machine because the login page is by-passed (with the Redirect to "menu.asp" below. OK - but where is my cookie stored? Or at least give me clue. What will the cookie be called and what text will it contain if: iAuthorID = 1 iSecurityLvl = 3
4
2738
by: Max | last post by:
Hello. This is the first time I've posted to a newsgroup, and I do this because I'm in desperate need of help. I'm working a user management system, and when I activate a user that has registered to my system, the current admin user logged in gets logged out. I can't seem to work out how - I can't even trace back where some of the variables are coming from (for example, the "ref" part of the Request.QueryString method). Could someone...
2
1331
by: lawren | last post by:
Students interested may contact directly.
0
1156
by: T Ralya | last post by:
My Session restarts on each postback of my ASP.NET page. I'm trying to figure out why. I set up a test application and have verified that the Request Object has one cookie on each entry. This Session ID cookie has a new session ID value and an expire attribute of zero on each post back. I verified that when the page exits, the Response object has one cookie with the same session ID as the Request object. The Session Object has 2...
15
2143
by: Edwin Knoppert | last post by:
I have searched but info is limitted. In my test app i used a non persistant cookie for forms authentication. slidingExpiration is set to true On run and close and rerun the login remains ok. I have a time-out of one minute and indeed, it directs me to the login if i wait to long. The slidingExpiration does it's work also.
4
2005
by: macro | last post by:
when I use HttpWebRequest with CookieContainer object that handles cookies, i make more than one request and needs to handle cookies being added and removed between requests, just like a regular web browser like internet explorer. if I have this cookie header in a response: Set-Cookie: <CookieName>=; path=/;expires=01-Jan-1999 00:00:00 GMT the cookie is not deleted for the next request, and is being sent again with
3
2462
by: Arpan | last post by:
An ASPX page has the following code: Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) If Not (IsNothing(Request.Cookies("AuthCookie"))) Then Response.Write(Request.Cookies("AuthCookie").Value) Else Response.Write(Cookie 'AuthCookie' Doesn't Exist!) End If End Sub
11
26510
pbmods
by: pbmods | last post by:
A somewhat obscure hack has emerged recently that is an offshoot of the now-infamous XSS. It is known as Cross-Site Request Forgery, or XSRF for short. XSRF is a form of temporary identity theft that can cause your computer to initiate banking transactions, send emails or text messages, or even change account info on your favorite site... without your ever realizing it! THE GOOD NEWS Before we get started on the doom and gloom, you...
0
9620
marktang
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...
0
10261
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
10104
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...
0
9912
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8934
agi2029
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...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6715
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.