I want to pass Some String between two controllers to show successful login with modal.I read this topics : ViewBag, ViewData and TempData and RedirectToAction with parameter
but it doesn't work for me and TempData returns Null.it's works fine in this Controllers.
    public async Task<IActionResult> LoginConfirm(LoginViewModel model)
    {
        ApplicationUser user = await userManager.FindByNameAsync(model.Email);
        if (user!=null)
        {
            var status = await signInManager.PasswordSignInAsync(user, model.Pass,model.RememberMe,true);
            if (status.Succeeded)
            {
                TempData["msg"] = "You Login successful ";
                return RedirectToAction("Index","Home");
            }
        }
        TempData["msg"] = "Somethings Wrong!";
        return View("Login");
    }
 
    