You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just found a possible issue when calling RedirectToAction with target action on another controller.
Here is the code:
public class HomeController : Controller
{
public IActionResult Index()
{
return this.RedirectToAction<TestController>(c => c.Test(9));
}
}
public class TestController : Controller
{
public IActionResult Test(long id)
{
return View();
}
}
The id parameter in Test action should be 9, but it's defaulted to 0. When I move the Test action into HomeController then it starts to work just fine.
Any suggestions appreciated,
Thanks
The text was updated successfully, but these errors were encountered:
Hi, thank you for your issue. Since I am overwhelmed with my other project https://github.com/ivaylokenov/MyTested.AspNetCore.Mvc, I did not have a lot of time to support this one. Will try to publish a new package during the weekend. Thank you for your patience!
Hi,
Just found a possible issue when calling RedirectToAction with target action on another controller.
Here is the code:
The id parameter in Test action should be 9, but it's defaulted to 0. When I move the Test action into HomeController then it starts to work just fine.
Any suggestions appreciated,
Thanks
The text was updated successfully, but these errors were encountered: