Last post Nov 19, 2018 07:30 AM by Sherry Chen
Nov 17, 2018 06:01 AM|elahi1mahdi|LINK
I want use session in my project , in home/index i set value for a session but when i get this session in home/about is null, why ?
public IActionResult Index()
public IActionResult About()
ViewBag.s = HttpContext.Session.GetString("Test2");
Nov 19, 2018 07:30 AM|Sherry Chen|LINK
Hi elahi1mahdi ,
I made a demo based on your code , and successfully got the session.
Try to create a new project to test if you could get the session value.
Could you share your project if you still fail to get the session in a new project ?
Best Regards ,