//Override FindView to load PdfView protected override ViewEngineResult FindView(ControllerContext context) { var result = base.FindView(context); if (result.View == null) return result; var pdfView = new PdfView(result); return new ViewEngineResult(pdfView, pdfView); }
protected override ViewEngineResult FindView( ControllerContext context) { ViewEngineResult result = base.FindView(context); if (result.View == null) { return(result); } PdfView pdfView = new PdfView(result); return(new ViewEngineResult(pdfView, pdfView)); }
//Override FindView to load PdfView protected override ViewEngineResult FindView(ControllerContext context) { var result = base.FindView(context); if (result.View == null) { return(result); } var pdfView = new PdfView(result); pdfView.Title = this.Title; if (string.IsNullOrEmpty(this.Title) && this.ViewBag.Title != null) { pdfView.Title = string.Format("{0}", this.ViewBag.Title); } pdfView.OfficeName = this.OfficeName; return(new ViewEngineResult(pdfView, pdfView)); }