摘要: CookieCookie是保存在客户端的名称/值的字符串对。当前浏览器从服务器响应中接收到Set-Cookie Http头时,就会设置Cookie,稍后如果请求的URL与该Cookie相关的Path以及domain的限制匹配时,浏览器会将该Cookie发送回服务器。设置会话Cookie:protected void page_load(object sender,EventArgs e){ HttpCookie cookie = new HttpCookie("name"); cookie.Value = "value"; this.Response.A 阅读全文
posted @ 2013-02-25 15:26 八神吻你 阅读(929) 评论(1) 推荐(0) 编辑
摘要: //怎样才能容易更换DB//写一个可以对用户插入和获取的方法namespace switchDB{ class User { public int ID { get; set; } public string Name { get; set; } } class SqlServerUser { public void Insert(User user) { } public void GetUser(int id) { } } class Program { static void Main(string[] args) { User u = new User(); SqlServerUse. 阅读全文
posted @ 2013-02-25 11:47 八神吻你 阅读(347) 评论(1) 推荐(0) 编辑