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/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

System.Web.HttpCookie.cs的更多相关文章

  1. System.Web.HttpSessionStateBase.cs

    ylbtech-System.Web.HttpSessionStateBase.cs 1.程序集 System.Web, Version=4.0.0.0, Culture=neutral, Publi ...

  2. System.Web.HttpContext.cs

    ylbtech-System.Web.HttpContext.cs 1.程序集 System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken ...

  3. System.Web.Mvc.HttpGetAttribute.cs

    ylbtech-System.Web.Mvc.HttpGetAttribute.cs 1.程序集 System.Web.Mvc, Version=5.2.3.0, Culture=neutral, P ...

  4. System.Web.Mvc.RouteAttribute.cs

    ylbtech-System.Web.Mvc.RouteAttribute.cs 1.程序集 System.Web.Mvc, Version=5.2.3.0, Culture=neutral, Pub ...

  5. System.Web.Mvc.HttpPostAttribute.cs

    ylbtech-System.Web.Mvc.HttpPostAttribute.cs 1.程序集 System.Web.Mvc, Version=5.2.3.0, Culture=neutral, ...

  6. System.Web.Mvc.RoutePrefixAttribute.cs

    ylbtech-System.Web.Mvc.RoutePrefixAttribute.cs 1.程序集 System.Web.Mvc, Version=5.2.3.0, Culture=neutra ...

  7. System.Web.UI.WebControls.FileUpload.cs

    ylbtech-System.Web.UI.WebControls.FileUpload.cs 1. 程序集 System.Web, Version=4.0.0.0, Culture=neutral, ...

  8. System.Web.Mvc.JavaScriptResult.cs

    ylbtech-System.Web.Mvc.JavaScriptResult.cs 1.程序集 System.Web.Mvc, Version=5.2.3.0, Culture=neutral, P ...

  9. System.Web.Mvc.ActionResult.cs

    ylbtech-System.Web.Mvc.ActionResult.cs 1.程序集 System.Web.Mvc, Version=5.2.3.0, Culture=neutral, Publi ...

随机推荐

  1. centos 7 中安装Oracle 12c

    今天有需要在centos 7上安装oracle 12 所以上网查了一下安装流程,原贴转自:https://blog.csdn.net/github_39294367/article/details/7 ...

  2. jQuery - 事件相关

    <script> $(function() { // 事件绑定 // 第一种方式 $("#btn").click(function() { alert("1 ...

  3. 简单介绍下怎么在spring中使用RabbitMQ

    这篇文章主要介绍了简单了解如何在spring中使用RabbitMQ,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 常见的消息中间件产品: (1)Ac ...

  4. Delphi 数学函数:常用的几个数学函数(Power、Abs、Int、Trunc、Round、Frac、sqr、sqrt)

    Delphi 常用的几个数学函数 1 Power函数,求次方 定义:function Power(X,Y): (Same type as parameter); 说明:X可以是整型,也可以是实型:返回 ...

  5. 「题解」:毛一琛/$cow$ $subsets$

    问题 A: 毛一琛/$cow$ $subsets$ 时间限制: 1 Sec  内存限制: 512 MB 题面 题面谢绝公开. 题解 题名貌似是个大神??看起来像是签到题然后就死了. 首先$O(3^n) ...

  6. 剑指offer——17数值的整数次方

    题目描述 给定一个double类型的浮点数base和int类型的整数exponent.求base的exponent次方.   保证base和exponent不同时为0   一般解法: 直接相乘: cl ...

  7. 在Ubuntu中安装MySQL (转载)

    MySQL在Linux Ubuntu中安装 本文使用的Linux是Ubuntu 12.04.2 LTS 64bit的系统,安装MySQL数据库软件包可以通过apt-get实现. 在Linux Ubun ...

  8. java-day03

    判断语句if格式 if(关系表达式){ } if...else格式: if(关系表达式){ }else{ } if...else if格式: if(关系表达式){ }else if(关系表达式){ } ...

  9. python实现一个简单木马!

    一个简单的木马程序 绝大多数的木马程序都是基于Socket来实现的 废话少说直接上代码! 代码: client部分: # -*- coding: UTF-8 -*- import socketimpo ...

  10. List<Map>中根据map的同一指标项数据——去重代码

    先看网络上,博客经常出现的错误代码: for(ABatchAddCheckVO aBatchAddCheckVO : addList){ dto.put("aac001",aBat ...