您好我有一个疑问如何在asp.net中打印Web应用程序 [英] hi i have one doubt how to print webapplication in asp.net

查看:61
本文介绍了您好我有一个疑问如何在asp.net中打印Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net和c#中开发了一个项目.
在该项目中是< code> GridView</code>和< code> CheckBox</code>.模板. gridview访问一列doc(.Doc)文件,其路径存储在sqlserver表中.
当我基于该行在GridView中选中该复选框时,doc文件将直接打印到客户端打印机.


请帮助如何编写打印编码

I have a project developed in asp.net and c#.
In that project is a <code>GridView </code>with a <code>CheckBox</code> template. The gridview accesses one column doc (.Doc) files whose paths are stored in sqlserver tables.
When I check the checkbox in GridView based on in that row that doc files are directly print to client printer.


plase help the how to write the print coding

推荐答案

您不能,无论如何也不可靠.
如果文件已经是本地文件,则所有用户的路径都不相同.

如果文件在服务器上,则最好的办法是在客户端的窗口中将其打开.您可以在.doc中添加一个宏以在打开时进行打印,但我强烈建议您不要使用它.另外,任何明智的用户在被要求对来自和不受信任的来源(例如网站)的Word文档上运行宏时,都会单击否".
You can''t, not reliably anyway.
If the file is already local, then the paths will not be the same for all users.

If the file is on the server then the best you can do is open it in the window on the client. You could add a macro to the .doc to print on open, but I''d strongly recommend against it. Additionally, any sensible user would click "No" when asked to run a macro on a word document from and "untrusted" source such as a website.


这篇关于您好我有一个疑问如何在asp.net中打印Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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