View Full Version : cookies trong ASP.Net
làm sao set Expires cho cookies ? muon set Expires là 365 ngày thì sao ? mình làm giống trong ASP nhưng ko duoc . hic :(
Làm như vầy được không
Response.Cookies["yourcookie"].Expires = System.DateTime.Now.AddDays(365);
White_Rose
29-05-2003, 12:21
Response.Cookies["yourcookie"] chỉ đọc thôi mà.
dùng
Response.Cookies.Set(cookie); -> thay đổi nội dung
Response.Cookies.Add(cookie); -> thêm cookie mới
tất nhiên cookie có type là HttpCookie
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.