Manoj Kalla
Can we pass route value with RedirectToAction method?
By Manoj Kalla in .NET on Nov 28 2024
  • Jignesh Kumar
    Dec, 2024 28

    Yes, You can pass using RedirectToAction.

    i.e. return RedirectToAction(“ActionName”, “ControllerName”, new { routeValue1 = value1, routeValue2 = value2 });

    • 0
  • Sangeetha S
    Dec, 2024 17

    Yes, you can pass route values with the RedirectToAction method in ASP.NET MVC.This method is commonly used to redirect to a different action method while also providing route values. Here’s a simple example: public ActionResult SomeAction() { return RedirectToAction("TargetAction", "Home", new { id = 5, name ="example" }); }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS