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

推荐订阅源

博客园 - 聂微东
罗磊的独立博客
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
L
LINUX DO - 最新话题
Webroot Blog
Webroot Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
T
Tenable Blog
Help Net Security
Help Net Security
WordPress大学
WordPress大学
H
Heimdal Security Blog
SecWiki News
SecWiki News
V2EX - 技术
V2EX - 技术
C
CERT Recently Published Vulnerability Notes
P
Privacy International News Feed
T
Tailwind CSS Blog
L
LINUX DO - 热门话题
Scott Helme
Scott Helme
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
O
OpenAI News
Latest news
Latest news
月光博客
月光博客
L
LangChain Blog
Google DeepMind News
Google DeepMind News
爱范儿
爱范儿
I
InfoQ
T
Threat Research - Cisco Blogs
人人都是产品经理
人人都是产品经理
Forbes - Security
Forbes - Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园_首页
雷峰网
雷峰网
T
Tor Project blog
Security Archives - TechRepublic
Security Archives - TechRepublic
G
GRAHAM CLULEY
Project Zero
Project Zero
MyScale Blog
MyScale Blog
V
V2EX
Vercel News
Vercel News
F
Fortinet All Blogs
The Register - Security
The Register - Security
N
News and Events Feed by Topic
P
Palo Alto Networks Blog
H
Hacker News: Front Page
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 司徒正美

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