zoukankan
html css js c++ java
asp.net cookie
HttpCookie ck
=
Request.Cookies[
"
cktest
"
];
if
(ck
==
null
)
{
ck
=
new
HttpCookie(
"
cktest
"
);
ck.Value
=
"
123
"
;
ck.Expires
=
DateTime.Now.AddSeconds(
20
);
//
20秒的有效期
Response.Cookies.Add(ck);
Response.Write(
"
new ck
"
);
}
else
{
Response.Write(ck.Value.ToString());
}
//
在一个Cookie中储存多个信息
/**/
/*
HttpCookie cookie = new HttpCookie("cktest");
cookie.Values.Add("v1","1");
cookie.Values.Add("v2","2");
cookie.Values.Add("v3","3");
Response.AppendCookie(cookie);
HttpCookie cookies = Request.Cookies["cktest"];
string value1 = cookies.Values["v1"];
string value2 = cookies.Values["v2"];
Response.Write(value1 + value2);
*/
查看全文
相关阅读:
springboot整合solr8.0
Java学习笔记之JFileChooser的简单使用
bootstrap-fileinput插件,上传成功后事件
centos7中安装mysql8.0
linux下安装mysql
IDEA集成JRebel热部署和远程调试
Flume学习之路 (一)Flume的基础介绍
android studio的安装和卸载
彻底卸载mysql
电脑重装系统后各种环境和工具的安装配置
原文地址:https://www.cnblogs.com/bluecobra/p/1694574.html
最新文章
转 在xcode6中使用矢量图(iPhone6置配UI)
NSFileManager获取子类目录
OC-NSFileManager
OC中显示当前时间
AxureOne
2018年度计划表
课外
OpenGL
清除
ss7
热门文章
python 算法
域名
服务器
堆栈帧
C语言的循环反汇编
函数调用
群论
搭建vue项目
Not implemented by the DistributedFileSystem FileSystem implementation
centos7下安装mysql5.7
Copyright © 2011-2022 走看看