标题: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



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-305829-1-1.html




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

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