private ViewEngineResult CreateNestedView( ViewEngineResult result, ControllerContext controllerContext) { if (result.View == null) return result; var parentContainer = controllerContext.HttpContext.GetContainer(); var nestedContainer = parentContainer.GetNestedContainer(); var webFormView = (WebFormView)result.View; var wrappedView = new WrappedView(webFormView, nestedContainer); var newResult = new ViewEngineResult(wrappedView, this); return newResult; }
private ViewEngineResult CreateNestedView( ViewEngineResult result, ControllerContext controllerContext) { if (result.View == null) { return(result); } var parentContainer = controllerContext.HttpContext.GetContainer(); var nestedContainer = parentContainer.GetNestedContainer(); var webFormView = (WebFormView)result.View; var wrappedView = new WrappedView(webFormView, nestedContainer); var newResult = new ViewEngineResult(wrappedView, this); return(newResult); }