在一个页面中跳转使用Redirect跳转,要想获取跳转前的cookie,请修改为Transfer方法。

如:

string url = TemplateSourceDirectory + "/Default.aspx?userGroupID=" + userGroupID + "&endUrl=" + endurl;

Response.Redirect(url);

修改为:
Server.Transfer(url);

 

在跳转成功后,这样就能获取跳转前的cookie或session的值。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2021-06-18
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2021-05-30
  • 2022-01-17
  • 2021-10-16
  • 2021-08-19
  • 2022-02-19
  • 2022-12-23
相关资源
相似解决方案