0
私は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
Sry、私のコピー貼り付けに失敗しました。私はまだesult dohとしてヌルを返します – sansactions
どのバージョンの.NETを使用していますか? [link](https://weblogs.asp.net/bleroy/Don_2700_t-redirect-after-setting-a-Session-variable-_2800_or-do-it-right_2900_)によると、古いバージョンにはセッションバグがありました。 – MennoB
.NET 4.6.1は私が使用しているバージョンです – sansactions