| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1608 人关注过本帖
标题:Response.Redirect 后cookie为null了
只看楼主 加入收藏
等待冰柠檬
Rank: 2
来 自:浙江温州
等 级:论坛游民
帖 子:208
专家分:70
注 册:2008-6-25
结帖率:66.67%
收藏
 问题点数:0 回复次数:0 
Response.Redirect 后cookie为null了
程序代码:
HttpCookieCollection cookies = Request.Cookies;

DataRow dr = dt1.Rows[0];

string username = dr["username"].ToString().ToUpper();
            //这里
Response.Cookies["huiyuan"]["huiyuanbianhao"] = username.Split('_')[0];
Session["huiyuanbianhao"] = username.Split('_')[0];

Response.Redirect("index.aspx");

跳转前 测试都还存在的
跳转后  Response.Cookies["huiyuan"]["huiyuanbianhao"] 为null
搜索更多相关主题的帖子: Response cookie Redirect null 
2010-05-08 13:24
快速回复:Response.Redirect 后cookie为null了
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016828 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved