473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Cookie. Urgent. Thank You.

Hello,

I have a Cookie which can have one or many values.
One of this values is "Culture".

How can I change the "Culture" value which in inside the cookie?

This is what I have:
Dim cookie As HttpCookie = Request.Cookies("MyWebSite")
If Not cookie Is Nothing Then ' Cookie MyWebSite exists

??? NEED to change the existing value of culture from en-US to fr-FR

Else ' Cookie MyWebSite Does Not Exist

' Create Cookie and Add "culture" value to it.

Dim newCookie As HttpCookie = New HttpCookie("MyWebSite")
newCookie.Values.Add("culture", "en-US")
newCookie.Expires = #01/01/3000#
Response.Cookies.Add(newCookie)

End If

Nov 19 '05 #1
3 1014
Actually this should work:
Dim newCookie As HttpCookie = New HttpCookie("MyWebSite")
newCookie.Values.Add("culture", "en-US")
newCookie.Expires = #01/01/3000#
Response.Cookies.Add(newCookie)


Does it not for some reason?

-Brock
DevelopMentor
http://staff.develop.com/ballen


Nov 19 '05 #2
If it does, it shouldn't.

Setting a cookie expiration date for the year 3,000
is wildly optimistic about the survival time for the
computer where the cookie is being stored... ;-)


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:64**********************@msnews.microsoft.com ...
Actually this should work:
Dim newCookie As HttpCookie = New HttpCookie("MyWebSite")
newCookie.Values.Add("culture", "en-US")
newCookie.Expires = #01/01/3000#
Response.Cookies.Add(newCookie)


Does it not for some reason?

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #3
> If it does, it shouldn't.

Setting a cookie expiration date for the year 3,000 is wildly
optimistic about the survival time for the computer where the cookie
is being stored... ;-)


LOL -- I was speaking about the mechanics. I didn't even notice the date...
*giggle*

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #4

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

Similar topics

10
by: Tony Archer | last post by:
Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a production box. On the dev box everything works fine, in production it hoses: One of...
1
by: Tony Archer | last post by:
(Forgive the dupicate post, I had left out the OS Version out of the prior post.) Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a...
1
by: Owen | last post by:
I have a web app that is a mixture of ASP and ASP.NET pages. Largely the only data passed between them is via the querystring, or by reading from a database. However there is a requirement for...
2
by: Raghu Raman | last post by:
Hi, In javascript file i store 3 values under a single cookie array ,like var myarray = new Array(null); myarray = "field_1"; myarray = "field_2"; myarray = "field_3"; document.cookie...
2
by: Owen | last post by:
I have a web app that is a mixture of ASP and ASP.NET pages. Largely the only data passed between them is via the querystring, or by reading from a database. However there is a requirement for...
9
by: Mike Reed | last post by:
I must be having a "senile" day! I cannot recall, nor get to work, code to read a cookie's expiration date/time in an ASP page/VBScript. What am I missing? *** Sent via Developersdex...
1
by: Joe | last post by:
In ASP.NET 1.1 I could detected expired form authentication tickets (which closely coincide with my expired session) by checking for the Authentication Cookie when the login screen loads. If the...
4
by: GaryDean | last post by:
I'm using the 2.0 login control with the "remember me" setting. When checked the cookie only last for a few hours then it is asking again for a login. I don't see any time settings. I know back...
3
by: Dave | last post by:
string m_request = some_web_page; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request ); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Which works...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...

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.