Just out of curiosity, what's the difference between these two attributes?
NonAction and ChildActionOnly
Both attributes seems to do the very same to me. Preventing the pipeline (action invoker) to invoke the action method. Please have a look at this snippet:
[NonAction]
private ActionResult StackOverflow1()
{
// Omitted for brevity.
return View();
}
[ChildActionOnly]
private ActionResult StackOverflow2()
{
// Omitted for brevity.
return View();
}
Of course both methods won't be invoked due to the fact that they are private - at least at the default implementation - but I would like to know the difference just out of curiosity...