摘要: 设置:HttpCookie cookie = new HttpCookie("cookieName"); cookie.Value = "name1"HttpContext.Current.Response.Cookies.Add(cookie); 读取:HttpContext.Current.Request.Cookies["cookieName"].Value判断cookie是否存在:if(HttpContext.Current.Request.Cookies["cookieName"]==null){//do 阅读全文
posted @ 2012-09-10 17:44 cpcpc 阅读(75485) 评论(3) 推荐(10)
摘要: C#读取web.config文件信息web.config<?xml version="1.0"?><!-- 有关如何配置 ASP.NET 应用程序的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=169433 --><configuration> <appSettings> <add key="name" value="name1"/> </appSettings></configuration>C#读取 阅读全文
posted @ 2012-09-10 17:38 cpcpc 阅读(19033) 评论(1) 推荐(2)