My problem is that I've added a new route [HttpGet("public-profile/{avatarName}")]
in PublicProfile
action and I don't know how to redirect to this Action.
So this is the Action that I want get redirected
[HttpGet("public-profile/{avatarName}")]
public async Task<ActionResult> PublicProfile(string avatarName)
{
return View();
}
What I had try was this way
[HttpPost]
public ActionResult PublicProfle()
{
return RedirectToAction("PublicProfile", "name");
}
However it isn't working
I've read about it here but it doesn't help me
RedirectToAction As Get Request format
RedirectToAction with parameter
ASP.Net Core MVC RedirectToAction is appending controller name in front of returnUrl