Ejemplo n.º 1
0
 public static void RenderView(string viewPath, object model, TextWriter writer, ControllerContext controllerContext, out string errorMessage)
 {
     errorMessage = null;
     try
     {
         var renderer = new RazorViewRenderer(controllerContext);
         renderer.RenderView(viewPath, model, writer);
     }
     catch (Exception ex)
     {
         errorMessage = ex.GetBaseException().Message;
     }
 }
Ejemplo n.º 2
0
        public static void RenderView(string viewPath, TextWriter writer, object model, ControllerContext controllerContext)
        {
            var renderer = new RazorViewRenderer(controllerContext);

            renderer.RenderView(viewPath, model, writer);
        }