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. 单源最短路径问题1 (Bellman-Ford算法)

    /*单源最短路径问题1 (Bellman-Ford算法)样例: 5 7 0 1 3 0 3 7 1 2 4 1 3 2 2 3 5 2 4 6 3 4 4 输出: [0, 3, 7, 5, 9] */ ...

  2. delphi 获得系统目录

    利用Api函数,现在我介绍两个Api函数,利用他们就可以轻松简单的获取这些特殊系统目录. Function SHGetSpecialFolderLocation(hwndOwner: HWND; nF ...

  3. bzoj1031题解

    [解题思路] 将原串复制一份拼接到原串后作为处理串,可以对处理串的前一半后缀排序,即可得出顺序.复杂度O(Llog2L). [参考代码] 也是naive的时候写的..后缀数组居然是用桶排求的.. #p ...

  4. 回滚树形dp(按dfs序dp)——hdu6035

    本题前面的操作别的博客里都有.难点在于颜色ci的贡献,如何一次dfs求出答案 先来考虑如何在一次dfs中单独对颜色i进行计算 用遍历dfs序的方式,在深搜过程中,碰到带有颜色 i 的点 u,u每个颜色 ...

  5. 动态隐藏显示窗口的标题栏(同时保持窗口的sizeable性能

    今天考虑作界面的时候,想去掉窗体的标题栏,但设置 Form.BorderStyle := bsNone; 会导致窗体不可再 Sizeable (通过鼠标操作改变窗体大小),仔细翻看了相关Help也没找 ...

  6. D 语言学习感受

    胃抽动!特想吐!不过,还是很佩服写这种语言的人,不是大拿,怎么可能开发一门语言!

  7. Unity 如何修改 particle system 的 start color 属性

    代码如下: ParticleSystem ps = GetComponent<ParticleSystem>(); var main = ps.main; var color = Colo ...

  8. 了解Metasploit中的Payloads(有效载荷)

    什么是payload? payload又称为攻击载荷,主要是用来建立目标机与攻击机稳定连接的,可返回shell,也可以进行程序注入等.也有人把payloads称 为shellcode. Shellco ...

  9. USACO2008 Roads Around The Farm /// queue oj23321

    题目大意: N (1 ≤ N ≤ 1,000,000,000)牛群在遇到岔路时,若能分为恰好相差 K (1 ≤ K ≤ 1000)的两路,则持续分裂(假设会一直遇到岔路),否则停止开始吃草. Inpu ...

  10. Reading books /// Prim+BFS oj21633

    题目大意: 输入 N,M 接下来1-N行输入读该书的用时time[i] 接下来1-M行输入a,b  表示a和b是similar的 若a读过则读b用时为 time[b]/2 ,若b读过则读a用时为 ti ...