asp.net-mvc ActionResult Calling An ActionResult In Another ActionResult

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

We can call an action result in another action result.

public ActionResult Action1()
{
    ViewData["OutputMessage"] = "Hello World";
    return RedirectToAction("Action2","ControllerName");
    //this will go to second action;
}


public ActionResult Action2()
{
    return View();
    //this will go to Action2.cshtml as default;
}


Got any asp.net-mvc Question?