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. mysql 学习之1 mysql的基本语法

    转载一位csdn中 乍得12138前辈的 转载:https://blog.csdn.net/qq_26200347/article/details/79781882

  2. leetcode-132-分割回文串②*

    题目描述: 方法一:动态规划 class Solution: def minCut(self, s: str) -> int: min_s = list(range(len(s))) n = l ...

  3. luoguP4768 [NOI2018]归程

    传送门 kruskal重构树: kruskal合并两个联通块时合并的边一定是联通块中权值最大的边,小于等于这条边的边所能联通的所有点在这个联通块中. 在合并两个联通块的时候新建一个点作为两个联通块代表 ...

  4. Openstack-L 路由注入方式

    目录 目录 前言 从 Commands 到 Action 操作函数 前言 Openstack 新旧版本提供了不同的路由注入方式,也就是 Route Module 的代码方式不同,就二次开发而言用那一种 ...

  5. HSE_VALUE 修改问题

    MDK的例程给的外部晶振是25Mhz,以24Mhz为例,介绍修改方法. ·1. 修改HSE_VALUE 在 “stm32f4xx.h" 搜索 ”HSE_VALUE" 会看到下面这句 ...

  6. eclispe 创建maven 项目:Could not resolve archetype org.apache.maven.archetypes

    昨天新装eclispe 后,创建maven工程后出现 Could not resolve archetype org.apache.maven.archetypes:maven-archetype-q ...

  7. Vue的项目搭建及请求生命周期

    目录 Vue的项目搭建及请求生命周期 Vue-CLI的项目搭建 环境搭建 项目创建 pycharm运行Vue项目 Vue项目的大体结构 Vue的请求生命周期 两个小用法 Vue的项目搭建及请求生命周期 ...

  8. 来个我一起学习Python把!!!(新手共同努力)

    <初识Python> 大家好,让我们一起来学习Python,因本人也是个新手但我会把我所学的东西分享出来,并记录自己的经验学习过程,不单单是分享代码,会详细的讲解,如有错误地方希望大家指点 ...

  9. pytong下安装安装SK-Learn

    安装SK-Learn需要依赖的Python安装包有: Python (>= 2.6), NumPy (>= 1.3), SciPy (>= 0.7), 下载python的各种包的地址 ...

  10. upper_bound() lower_bound() 用法

    头文件 #include<algorithm> #include<iostream>#include<vector>#include<algorithm> ...