更新时间:2023-01-08 11:19:39
尝试
Try
Response.Redirect("View.aspx", false);
我认为回复.redirect结束响应。 Response.End实际上使用ThreadAbortException停止页面的执行。这里真正发生的是会话令牌在战斗中丢失。
Response.Redirect(View.aspx,false);不会中止线程,从而节省会话令牌。实际上,这个重载在RedirectFromLoginPage内部使用。
--Guru
I think the response.redirect ends the response. Response.End actually stops the execution of the page wherever it is using a ThreadAbortException. What happens really here is that the session token gets lost in the battle.
Response.Redirect("View.aspx", false); does not abort the thread and thus conserve the session token. Actually, this overload is used internally by RedirectFromLoginPage.
--Guru
尝试使用以下代码:
Try with following code:
Response.Redirect("View.aspx", false);
欲了解更多信息,请访问以下链接:
http://weblogs.asp.net/bleroy/archive/2004/08/03/Don_2700_t-redirect-after-setting-a-Session-variable-_2800_or-do-it-right_2900_.aspx [ ^ ]
http://***.com/questions/699742/asp-net-session-value-not-changing [ ^ ]