开发者

printing a view page in asp net mvc2

I'm developing an ASP.Net MVC2 proj开发者_如何学Cect. What I need is that I want to print the view when user clicks a link.


You could use Javascript on a link

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜