Click here to Skip to main content
15,913,836 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Add attribute toserver control in ASP.NET Pin
Mazdak5-Jul-02 6:42
Mazdak5-Jul-02 6:42 
GeneralRe: Add attribute toserver control in ASP.NET Pin
Andy Smith5-Jul-02 9:47
Andy Smith5-Jul-02 9:47 
GeneralRe: Add attribute toserver control in ASP.NET Pin
Mazdak5-Jul-02 22:58
Mazdak5-Jul-02 22:58 
GeneralUsing Variables from One ASP to Other ASP Page Pin
Pradhip5-Jul-02 4:29
Pradhip5-Jul-02 4:29 
GeneralRe: Using Variables from One ASP to Other ASP Page Pin
Not Active5-Jul-02 8:17
mentorNot Active5-Jul-02 8:17 
GeneralRe: Using Variables from One ASP to Other ASP Page Pin
Ed K5-Jul-02 8:43
Ed K5-Jul-02 8:43 
GeneralRe: Using Variables from One ASP to Other ASP Page Pin
Not Active5-Jul-02 15:22
mentorNot Active5-Jul-02 15:22 
GeneralNeed help with ASP.NET Cookies Pin
Erik Westermann5-Jul-02 2:49
professionalErik Westermann5-Jul-02 2:49 
Hey there,

I'm having a problem with ASP.NET cookies for an article I'm working on (for CP). I want to check if a client has a cookie called "LastVisit" and use it's Expires property to determine if the user visited a page within the last n minutes. If the cookie is not expired I want to take one action, if it is expired, I want to update the time the cookie expires and allow the user to continue normally.

I thought this would be easy, but I'm having problems. I can create the cookie and set its Expires property, but cannot seem to read it back. I'm using the HttpCookieCollection.Count property to figure out if the client has any cookies and then attempting to read the "LastVisit" cookie if Count==1. This is where the problem is: I cannot update the value of the Expires property using the following code Mad | :mad: :

// 20 seconds only for testing...
HttpContext.Current.Response.Cookies.Item("LastVisit").Expires=DateTime.Now.Add(new TimeSpan(0,0,0,20));

Response.Cookies.Add(HttpContext.Current.Response.Cookies.Item("LastVisit"));


Any suggestions?

Thanks!

Erik Westermann
Author, Learn XML In A Weekend (Fall 2002)
GeneralRe: Need help with ASP.NET Cookies Pin
Erik Westermann5-Jul-02 8:18
professionalErik Westermann5-Jul-02 8:18 
GeneralSending a XML file to client Pin
Alexandru Savescu4-Jul-02 22:28
Alexandru Savescu4-Jul-02 22:28 
GeneralRe: Sending a XML file to client Pin
Richard Deeming5-Jul-02 0:10
mveRichard Deeming5-Jul-02 0:10 
GeneralRe: Sending a XML file to client Pin
Alexandru Savescu5-Jul-02 0:22
Alexandru Savescu5-Jul-02 0:22 
GeneralNeed Help: Web Services Pin
Pravesh Soni4-Jul-02 21:28
Pravesh Soni4-Jul-02 21:28 
GeneralRe: Need Help: Web Services Pin
SimonS5-Jul-02 0:16
SimonS5-Jul-02 0:16 
GeneralRe: Need Help: Web Services Pin
Pravesh Soni5-Jul-02 1:07
Pravesh Soni5-Jul-02 1:07 
GeneralRe: Need Help: Web Services Pin
SimonS5-Jul-02 1:49
SimonS5-Jul-02 1:49 
GeneralRe: Need Help: Web Services Pin
Pravesh Soni6-Jul-02 1:40
Pravesh Soni6-Jul-02 1:40 
Generaldot net check Pin
Brandon Parker3-Jul-02 13:02
Brandon Parker3-Jul-02 13:02 
GeneralRe: dot net check Pin
Not Active4-Jul-02 6:01
mentorNot Active4-Jul-02 6:01 
GeneralRe: dot net check Pin
Brandon Parker4-Jul-02 19:34
Brandon Parker4-Jul-02 19:34 
GeneralRe: dot net check Pin
SimonS5-Jul-02 0:25
SimonS5-Jul-02 0:25 
Generaldb folder above root Pin
isCode3-Jul-02 10:04
isCode3-Jul-02 10:04 
GeneralRe: db folder above root Pin
Jeremy Falcon3-Jul-02 10:13
professionalJeremy Falcon3-Jul-02 10:13 
GeneralRe: db folder above root Pin
isCode3-Jul-02 10:52
isCode3-Jul-02 10:52 
GeneralRe: db folder above root Pin
Jeremy Falcon3-Jul-02 11:04
professionalJeremy Falcon3-Jul-02 11:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.