惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
罗磊的独立博客
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
S
Schneier on Security
V
Vulnerabilities – Threatpost
T
Tenable Blog
博客园 - 【当耐特】
博客园 - 聂微东
I
Intezer
S
Securelist
C
Cisco Blogs
腾讯CDC
T
The Exploit Database - CXSecurity.com
NISL@THU
NISL@THU
P
Proofpoint News Feed
Cyberwarzone
Cyberwarzone
Security Archives - TechRepublic
Security Archives - TechRepublic
D
Darknet – Hacking Tools, Hacker News & Cyber Security
美团技术团队
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
AWS News Blog
AWS News Blog
A
About on SuperTechFans
Last Week in AI
Last Week in AI
Cloudbric
Cloudbric
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
The Last Watchdog
The Last Watchdog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
C
CERT Recently Published Vulnerability Notes
酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
The Register - Security
The Register - Security
博客园 - 叶小钗
博客园 - 司徒正美
博客园_首页
Google DeepMind News
Google DeepMind News
Hacker News: Ask HN
Hacker News: Ask HN
Spread Privacy
Spread Privacy
雷峰网
雷峰网
I
InfoQ
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Schneier on Security
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - Jailu

如何在IIS5.1/IIS6.0上使用ASP.NET URL Routing 如何在Web Form中使用URL Routing? Linq to SQLite使用笔记 Response.ContentType 详细列表 如何利用Google Code的SVN显示Html页面 Windows7下IIS7的安装及ASP配置方法 [原]分享几个日常开发中经常用到的软件 解决FF中的bug:JavaScript focus() throws "Permission denied to get property XULElement.selectedIndex" [原]请留心asp:Image控件中的ImageUrl属性 开心网辅助程序--开心网争车位助手正式发布(含源码) 开心网辅助程序开发手记(四):贴条功能+逻辑停车+简单界面 开心网辅助程序开发手记(三):实现停车功能 HTML:对话框插件thickbox使用技巧 - Jailu - 博客园 开心网辅助程序开发手记(二):获取好友私家车位信息 [程序收藏]把Unicode转成汉字 开心网辅助程序开发手记 原来.NET Framework 2.0也是支持母版页嵌套的 Fire event in IE & Firefox 【转】FireFox与IE开发上的一些区别
ASP.NET中Cookie问题求教
Jailu · 2009-01-21 · via 博客园 - Jailu

第一次在ASP.NET中操作cookie,碰到了一个相当郁闷的问题--怎样才能把cookie永久的保存在客户端?望大侠们不吝赐教!

下面是我写的用来向客户端写cookie的代码 :

Code

当浏览器关闭后,cookie就丢失了。

在测试过程中,我特意留意了一下本地文件夹Temporary Internet Files,发现cookie并没有被写到客户端,这是否说明cookie是基于会话的?要怎样才能把cookie写到客户端呢?

为了检查代码的正确性,我另外建了一个空网站,在Page_Load事件中写入一样的代码,发现cookie是可以被写到本机的!是否有其他因素会影响cookie的正常写入客户端?

问题已解决,具体代码如下:

Code

同时推荐一个IE Cookie查看器:IE Cookies View(http://www.nirsoft.net/utils/iecookies.html)