I own this site: http://www.sohjel.ir ; I've implemented an option called: "Watch Bag", using ASP.NET Core 2.1 MVC Session. And my problem is: I want to return back to exactly where I click "Add To Watch Bag" in that page after I click this button and adding that lesson to "Watch Bag" instead of returning back to "Begin of Page". How do I do that?! Note that I've used this code in my Controller:
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Index(int id)
{
List<int> lstViewBag = HttpContext.Session.Get<List<int>>("sjViewBag");
if (lstViewBag == null)
{
lstViewBag = new List<int>();
}
lstViewBag.Add(id);
HttpContext.Session.Set("sjViewBag", lstViewBag);
return RedirectToAction("Index", "Home", new { area = "Customer" });
}