I have the following on a razor page:
@{ Session["CurrentUrl"] = Request.Url.ToString(); }
I then call another page and in the POST action method of that second page I try to check the value of
var aaaa = Session["CurrentUrl"];
Can someone give me some advice as to why the value of variable aaaa is null ?
You just need to store your data in TempData variable. TempData internally stores in session object.
Hope this helps!