ASP.NET MVC return empty view

asp.net-mvc

Solution

return instance of EmptyResult class

 return new EmptyResult();

Problem

What is the most natural way to return an empty ActionResult (for child action)? ``` public ActionResult TestAction(bool returnValue) { if (!returnValue) return View(EmptyView); return View(RealView); } ``` One option I can see is to create an empty view and reference it at EmptyView... but may be there is any built-in option?

Original source

Related problems