0

In a View I want download the current view as a pdf-file. How can you give the contents of the view to the controller?

<td><span>
   <a href='<%: Url.Action("ListToPdf", 
     new { AHtmlContents = this.SourceCode.ToString()})%>'
     target="_blank">Download list</a>
</span></td>
tereško
  • 58,060
  • 25
  • 98
  • 150
user1531040
  • 2,143
  • 6
  • 28
  • 48
  • Have you see this: http://stackoverflow.com/questions/18442343/get-html-from-mvc-4-view-into-a-string? – Gustavo F Jan 30 '15 at 18:33
  • Why don't you create html on server side itself from your data instead of taking it from view? I know it will add more code but I think it will be easy for you to manage. – Hiren Feb 20 '15 at 00:45

0 Answers0