desno
desno

Reputation: 1

printing a view page in asp net mvc2

I'm developing an ASP.Net MVC2 project. What I need is that I want to print the view when user clicks a link.

Upvotes: 0

Views: 588

Answers (2)

Chris Marisic
Chris Marisic

Reputation: 33098

In combination with the answer from @M.Shuwaiee you can also take advantage of creating a style sheet specifically for the printer so your view can render more accurately for a paper layout.

http://www.webcredible.co.uk/user-friendly-resources/css/print-stylesheet.shtml has some information on this.

Upvotes: 0

Shuwaiee
Shuwaiee

Reputation: 677

You could use Javascript on a link

<a href="javascript:window.print();">Print</a>

Upvotes: 1

Related Questions