Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 5th, 2005, 01:33 PM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cookie Updating in ASP.NET

I am currently working on a site coded in VB.NET that will take an existing cookie set under the default domain (i.e. something.google.com), save the values in the cookie, delete the original cookie* and rebuild the cookie with the site's primary domain (i.e. google.com).

*Using the below code to delete the cookie from the user's machine:
  Response.Cookies("myCookie").Expires = DateTime.Now.AddDays(-1)
  Response.Cookies.Add(Request.Cookies("myCookie"))

I accomplish all of the above from within the Global.asax.vb file within the session_start method. The problem I'm experiencing is that, upon opening the site, the cookie is changed. However, in order for the controls accessing the cookie* to display properly, I must end the current session and reload the site.

*Accessing the cookie with the below code:
  If (Request.Cookies.Item("myCookie") Is Nothing = False) Then
    'control manipulation code
  End If

Is there a way around having to reload the session and have the new cookie under the primary domain be read 'on the fly' so to speak? Any help or references would be appreciated.

Reply With Quote
  #2 (permalink)  
Old May 5th, 2005, 06:55 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

This is the classic ASP area of the forum - try the .net area.

Wind is your friend
Matt
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 2.0 Updating Database Record columth06 ASP.NET 2.0 Basics 0 November 4th, 2006 07:43 AM
Error in updating the Views through ASP.Net App. pavanp ASP.NET 1.0 and 1.1 Professional 0 September 7th, 2004 01:47 AM
Accessing .asp cookie from ASP.net ksams General .NET 4 July 7th, 2004 02:34 AM
Cookie btw. ASP and .NET collie VB.NET 2002/2003 Basics 5 November 10th, 2003 09:38 AM



All times are GMT -4. The time now is 07:58 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.