actionresult

ASP.NET Core Demystified - Action Results

Next up in our ASP.NET Core Demystified series, we will discuss and demo a whole bunch of classes which implement the IActionResult interface and inherit from the corresponding ActionResult class. These classes are used as responses from controller actions, and include redirecting to another site, redirecting to a different controller action, returning a JSON object, and returning a file to the browser. In this post, we will first discuss the IActionResult interface and what it needs, and then we... Read more >

What are ActionResults? - ASP.NET MVC Demystified

If you've been working in ASP.NET MVC at all, you've seen code like this before: public ActionResult Index() { return View(); } Any action in an MVC controller, generally speaking, returns an ActionResult. Obviously that class represents an action of some kind, but exactly what does it do? Let's peel back the covers on ActionResult and discover why it and its derived classes are critical to understanding ASP.NET MVC. What is an ActionResult? ActionResult is an abstract class that represents... Read more >