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

Using Child Actions

Child actions are action methods that we invoke from within a view. This lets us avoid repeating logic in our controller that we want to use in several places in the application.

images Note Child actions are to actions as partial views are to views. See Chapter 25 for details of partial views.

We might use a child action whenever we want to display some data-driven “widget” that appears on multiple pages and contains data unrelated to the main action that is running. This is commonly the case when we want part of the overall page to contain navigation links, where the data required to create navigation links is unrelated to the ...

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