this is my logout method in user panel .I want to when I log out , it redriect to action Index but in the Other Controller
I mean In Main Controller and “Index” method
[HttpGet("UserPanel/Exit")]
public async Task<IActionResult> LogOut()
{
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
TempData[InfoMessage] = "You Logout SuccessFully";
return RedirectToAction("Index", "Home");
}