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. Codeforces 1140E DP

    题意:给你一个数组,如果数组中的某个位置是-1那就可以填1到m的数字中的一个,但是要遵守一个规则:不能出现长度为奇数回文的子串,问合法的填法有多少种? 思路:不出现长度为奇数的回文子串,只需不出现长度 ...

  2. centos做免密登录

    CentOS 6.9 SSH配置用户免密码登录 1. 演示环境: 192.168.1.144:CentOS 6.9 x86_64 192.168.1.146:CentOS 7.4 x86_64 2.  ...

  3. __init__初始化方法

    使用场景:多个对象(由同一个类产生)的属性同名且值都一样,这时就需要使用init()方法. # 多个对象(由同一个类产生)的属性同名且值都一样,这时就需要使用__init__()方法. # class ...

  4. FFmpeg Download

    https://ffmpeg.zeranoe.com/builds/

  5. 【转】Git 修改已提交的commit注释

    https://www.jianshu.com/p/098d85a58bf1 [重点] 通过git rebase -i HEAD~2 你想修改哪条注释 就把哪条注释前面的pick换成edit git ...

  6. NX二次开发-UFUN创建镜像体UF_MODL_create_mirror_body

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN ...

  7. NX二次开发-打开弹出当前part所在的文件夹

    #include <uf.h> #include <uf_part.h> #include <atlstr.h> #include <iostream> ...

  8. ionic-CSS:ionic icon(图标)

    ylbtech-ionic-CSS:ionic icon(图标) 1.返回顶部 1. ionic icon(图标) ionic 也默认提供了许多的图标,大概有 700 多个,针对 Android 和 ...

  9. 引入CSS的方法

    ##1 关于引入css样式的方法: 1 外部引入: <link rel="stylesheet" type="text/css" href="& ...

  10. shell设置时间递减脚本

    经常要用shell来做时间的定时任务,尤其是用sqoop脚本拉取数据的时候,那么假如当你要导入数据是残缺的时候呢,我写了一个能自定义时间并逐条递减的程序 #!/bin/bash   . /etc/pr ...