473,791 Members | 3,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing and Retrieving Cookies...

Hello,
Does anyone know how I can Write a Cookie and then later
retrieve it...? Also, Is it possible to write attributes
and corresponding values to the cookie file.Needless to
say would require this in .Net (VB.Net or C#)...

A sample code or an article on how to accomplish this
would be very much appreciated...

Thanks,
SamG.
Nov 20 '05 #1
1 3635
Sam -

Check out these topics on reading and writing cookies:
Code: Writing a Cookie (Visual Basic)
http://msdn.microsoft.com/library/en...deexamplewriti
ngcookie.asp

Code: Reading a Cookie (Visual Basic)
http://msdn.microsoft.com/library/en...deexamplereadi
ngcookie.asp

hope that helps

Steve Stein
VB Team

This posting is provided "AS IS" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "SamG" <an*******@disc ussions.microso ft.com>
| Sender: "SamG" <an*******@disc ussions.microso ft.com>
| Subject: Writing and Retrieving Cookies...
| Date: Mon, 12 Jan 2004 06:04:36 -0800
| Lines: 11
| Message-ID: <07************ *************** *@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcPZFQLD/EZJ7uJKS1yoCa/fz9QZLg==
| Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| Path: cpmsftngxa07.ph x.gbl
| Xref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:172067
| NNTP-Posting-Host: tk2msftngxa13.p hx.gbl 10.40.1.165
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
|
| Hello,
| Does anyone know how I can Write a Cookie and then later
| retrieve it...? Also, Is it possible to write attributes
| and corresponding values to the cookie file.Needless to
| say would require this in .Net (VB.Net or C#)...
|
| A sample code or an article on how to accomplish this
| would be very much appreciated...
|
| Thanks,
| SamG.
|

Nov 20 '05 #2

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

Similar topics

1
3944
by: Google Mike | last post by:
Tell me if this can be done, and if I have a misconception here. I am writing an app that will be served up in an app farm, and therefore I need to move the session information to the client, not using server-side session features. The way I have typically done this in the ASP world was with cookies. Another way to handle this is with a keyed record in a database, but the cookie strategy reduces the number of times I need to hit a...
20
3558
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
7
2998
by: Brian Burgess | last post by:
Hi all, Anyone see anything wrong with the following: *************************************************************** <%@ LANGUAGE="VBSCRIPT" %> <% Option Explicit Dim nAcctNbr Dim nMsgStart
1
5153
by: Vikram Bhatia | last post by:
In my web application we are able to store large data in the browser cookie keeping in mind the limit of 300 cookies per cookie file, 20 keys per cookie per domain and 4KB max size of each cookie. We are unable to retreive this large amount of data immediately after storing through document.cookie in IE browser (The same works fine in Netscape). Is there any limit on the size of the data that can be retreived using document.cookie in IE...
4
2552
by: Robin Briggs | last post by:
Hi. I have an ASP (3.0, not .NET) app that writes cookies with hyphens and spaces in the names and values. If I had the control over the apps that will be looking for these cookies, I would eliminate the special characters, but as it is, I do not have that luxury. When I write the cookies, they seem okay in IE, but in Firefox, they are strange. For example, the cookie name is US-NONUS, but in Firefox it looks like US%2DNONUS. For a...
2
3400
by: Mr Flibble | last post by:
Hey! I get a 404 from a website (this is "correct behaviour") and I'm interested in the value in the cookie "SMSESSION". The question is the following code generates an exception due to the 404. How am I still able to read the cookies even though I get an exception? Here's the code:
2
1227
by: teddarr | last post by:
I want to write a cookie that will hold purchase information. The name of this cookie will be a julian date/time. How do I go about retrieving all the cookies within a certain time period? Example: cookie names, 7236, 7210, 7111. Is there a way to retrieve these 3 cookies when others exist that have characters for names? I need to display the contents of each of these cookies to show purchase history over the last 2 months.
1
1402
by: sarvesharnie | last post by:
dear folks, i developed a small web browser... on that web browser i need to store the cookies and retrieve the cookies... how to do that . i developed this application C# windows application... please help me out. regards sarvesh
2
1202
by: SV | last post by:
I have a login form with “Remember me on this computer” checkbox. I am creating cookie if checkbox is checked. My code is: If chk_remember.Checked = True Then Dim ckUserName As HttpCookie = New HttpCookie("CTUserName") ckUserName.Value = Trim(txt_unm.Text) ckUserName.Expires = System.DateTime.Now.AddYears(4)
0
9669
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
10427
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
10207
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...
1
10155
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,...
0
9995
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
9029
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...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
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
2
3718
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.