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

推荐订阅源

T
Tailwind CSS Blog
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Tor Project blog
T
Tenable Blog
Know Your Adversary
Know Your Adversary
Webroot Blog
Webroot Blog
V
Vulnerabilities – Threatpost
WordPress大学
WordPress大学
S
Security @ Cisco Blogs
J
Java Code Geeks
S
SegmentFault 最新的问题
A
Arctic Wolf
Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Forbes - Security
Forbes - Security
爱范儿
爱范儿
T
The Blog of Author Tim Ferriss
S
Securelist
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
月光博客
月光博客
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
SecWiki News
SecWiki News
aimingoo的专栏
aimingoo的专栏
腾讯CDC
U
Unit 42
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
Latest news
Latest news
I
InfoQ
V2EX - 技术
V2EX - 技术
The Cloudflare Blog
V
V2EX
The Register - Security
The Register - Security
博客园 - Franky
Security Archives - TechRepublic
Security Archives - TechRepublic
Security Latest
Security Latest
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
云风的 BLOG
云风的 BLOG
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
小众软件
小众软件
N
Netflix TechBlog - Medium
量子位
M
MIT News - Artificial intelligence

博客园 - 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)