O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

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

Understanding Results from Action Methods

One of the most important aspects of an action method is its result. This instructs the MVC framework as to the next step to take in processing the request. The simplest kind of instruction is to do nothing, which we can express by defining an action method that has no return value, using the C# void keyword, as shown in Listing 28-5.

Listing 28-5. Defining an action method that defines no next step

using System.Linq; using System.Web.Mvc; using EventRegistration.Models.Domain; using EventRegistration.Models.Domain.Repository; namespace EventRegistration.Controllers {     public class CompetitionController : Controller {         private IRepository repository;         public CompetitionController(IRepository ...

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