簡體   English   中英

重定向ASP.net之后的會話

[英]Session after redirect ASP.net

我對ASP.Net相當陌生,並且正在測試重定向后會話的工作方式。 問題是重定向后我無法檢索數據。

代碼形式1:

Session["person"] = person; // Object
Session["relation"] = relation; // Object
Response.Redirect("~/Fom2.aspx", false); // found online this has to be false to keep session token

代碼表2:

Person person = (Person)(Session["person"]); //null
Relation relation = (Relation)(Session["relation"]); //null

有誰能夠幫助我? 日Thnx

Session["string"]中的Session["string"]必須完全相同。 在表格2中從Session["person "]刪除空格,因此它是Session["person"]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM