O'Reilly logo

ASP.NET MVC 1.0 Quickly by Maarten Balliauw

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a custom ActionResult

The ASP.NET MVC framework's action method implements the concept of returning an ActionResult instance, which will typically render a specific view, or redirect the user to a different location on the web site. An ActionResult that renders a view is returned as a RenderViewResult . The ExecuteResult() method is called in order to render specific contents to the HTTP response stream.

An ActionResult can take any form, as we have seen in Chapter 4, as long as it has something to do with the HTTP response stream. For example, you can create a FileDownloadResult that streams a file on the HTTP response stream, or a PermanentRedirectResult that renders HTTP status code 302.

One of the problems that many web designers face ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required