如何使用C#在网页中打印文本文件? [英] How to print a text file in a web page using c#?

查看:92
本文介绍了如何使用C#在网页中打印文本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何在控制台中使用C#在浏览器中打印文本文件?

谢谢

Hi,
How to print a text file in a browser using c# in console?

Thanks

推荐答案

您不能-不允许您了解客户端所使用的环境,其中包括任何打印工具.最好的办法是打开一个包含文本文件内容的新浏览器窗口,然后使用javascript window.print()函数.
You can''t - you are not allowed to know about the environment the client is working in, and that includes any print facilities. The best you can do is open a new browser window holding the text file content, and use the javascript window.print() function.


这篇关于如何使用C#在网页中打印文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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