So, I'm creating a basic time table application, and I want to pass the user name to another controller like that:
//POST
[HttpPost]
[ValidateAntiForgeryToken]
public IActionResult Index(Login obj)
{
return RedirectToAction(actionName:
"Index", controllerName:
"EmploiDuTemps", obj.Name);
}
and I try to receive it on the other controller like this :
public IActionResult Index(string obj)
{
return View(obj);
}
so I can use it the view, but it doesn't work, can someone help me?