Created
November 2, 2012 02:40
-
-
Save RazorAnt/3998354 to your computer and use it in GitHub Desktop.
RazorPDF View to Pdf or Html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Something() | |
{ | |
// Get model | |
var list = repository.GetStuff(); | |
// Output to Pdf? | |
if (Request.QueryString["format"] == "pdf") | |
return new PdfResult(list, "Something"); | |
return View(list); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment