'How to call Controller from APIController Class Method
public class ResitController : ApiController
{
[HttpGet]
public async Task<IHttpActionResult> Resit(string invoiceNo)
{
return RedirectToAction("Index", "Home","");
}
}
public class HomeController : Controller
{
public ActionResult Index()
{
return View("");
}
}
I need to RedirectToAction to render a View from this controller method above, but it cannot resolve "RedirectToAction".
Please help by suggesting alternatives to it.
The final output should render a view from the controller.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
