ASP.NET MVC - HybridViewResult (ViewResult /PartialViewResult)
问题 Is it possible to build a hybrid ViewResult that returns in depedency of an AjaxRequest or HttpRequest a PartialViewResult or ViewResult ? IsAjaxRequest --> return PartialViewResult !IsAjaxRequest --> return ViewResult As far as I know my HybridViewResult should derive from ViewResultBase. But how to implement the FindView method? 回答1: Try: public class HybridViewResult : ActionResult { public string ViewName { get; set; } public HybridViewResult () { } public HybridViewResult (string