ylbtech-System.Web.HttpCookie.cs
1.程序集 System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a返回顶部
1、
#region 程序集 System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\System.Web.dll
#endregion using System.Collections.Specialized;
using System.Reflection; namespace System.Web
{
[DefaultMember("Item")]
public sealed class HttpCookie
{
public HttpCookie(string name);
public HttpCookie(string name, string value); public string this[string key] { get; set; } public string Name { get; set; }
public string Path { get; set; }
public bool Secure { get; set; }
public bool Shareable { get; set; }
public bool HttpOnly { get; set; }
public string Domain { get; set; }
public DateTime Expires { get; set; }
public string Value { get; set; }
public bool HasKeys { get; }
public NameValueCollection Values { get; }
}
}
2、
2. 示例返回顶部
1、WebForm
HttpCookie cookie = new HttpCookie("Mobile", "");    //创建一个Cookie
cookie.Expires = DateTime.Now.AddMinutes(); //设置过期日期和时间
Response.Cookies.Add(cookie); //添加Cookie
2、API 有问题
#region 权限设置
HttpCookie cookie = new HttpCookie("cu_mobile", Mobile); //创建一个Cookie
if (entity.Status == || entity.Status == )
{
cookie.Expires = DateTime.Now.AddHours().AddMinutes(); //设置过期日期和时间
}
else
{
cookie.Expires = DateTime.Now.AddMinutes(-); //设置过期日期和时间
}
Response.Cookies.Add(cookie); //添加Cookie
#endregion
3、
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

最新文章

  1. C#反射机制 (转载)
  2. 【C-运算符】
  3. [ZigBee] 3、ZigBee基础实验——GPIO输出控制实验-控制Led亮灭
  4. django 提示ImportError: cannot import name json_response
  5. 使用C#实现FTP的文件上传和下载【转】
  6. Linux for QQ 安装
  7. BestCoder Round #74
  8. 火狐浏览器设置placeholder的时候记得改opacity
  9. [改善Java代码]异步运算考虑使用Callable接口
  10. Windows Server 2008 R2 安装及配置指南
  11. Csharp 高级编程 C7.1.2(2)
  12. UML02-用例图
  13. canvas实现画板功能(渐变、动画、阴影...)
  14. [Python] networkx入门 转
  15. oracle中order by造成分页错误
  16. Effective Java 第三版——54. 返回空的数组或集合不要返回null
  17. bzoj3261: 最大异或和 可持久化trie
  18. ie8下jquery改变PNG的opacity出现黑边
  19. Android动画及滑动事件冲突解决(转载)
  20. LNMP-day3-php扩展缓存插件

热门文章

  1. 用C#简单实现的36进制转换代码
  2. sublime快捷键汇总
  3. Servlet(Server Applet) 详解
  4. 零距离接触阿里云时序时空数据库TSDB
  5. Java中的线程Thread方法之---join()
  6. bzoj1016题解
  7. fastJson中常用方法以及遇到的“坑”
  8. centos7.2搭建kubernetes1.5.2+dashboard
  9. 2019 牛客多校第一场 F Random Point in Triangle
  10. AtCoder ABC 131E Friendships