做一个打印机友好的ASP.NET页面的最佳方式? [英] Best way to make a printer-friendly ASP.NET page?

查看:190
本文介绍了做一个打印机友好的ASP.NET页面的最佳方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是好奇,大多数人是如何让自己的ASP.NET页面打印机友好的?你创建ASPX页面,使用CSS或别的东西的一个单独的打印机友好的版本?你如何处理像分页和宽表的情况呢?

I'm just curious how most people make their ASP.NET pages printer-friendly? Do you create a separate printer-friendly version of the ASPX page, use CSS or something else? How do you handle situations like page breaks and wide tables?

有,对于大多数的情况下,作品一件优雅的解决方案?

Is there one elegant solution that works for the majority of the cases?

推荐答案

您基本上使隐藏的东西或提供简单的打印机友好的风格的东西,然后添加了媒体=另一个CSS文件打印使得它仅适用于印刷介质(当它被打印)

You basically make another CSS file that hide things or gives simpler "printer-friendly" style to things then add that with a media="print" so that it only applies to print media (when it is printed)

<link rel="stylesheet" type="text/css" media="print" href="print.css" />

这篇关于做一个打印机友好的ASP.NET页面的最佳方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆