打印按钮问题 [英] Print button question

查看:77
本文介绍了打印按钮问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户输入数据的表单。我也有相同的页面,没有控制按钮。我想要的是点击打印按钮并打印没有控制按钮的页面,但数据将在该Web表单的文本框中。有没有办法做到这一点?

I have a form that a user has entered data. I also have the same page with no control buttons on it. What I want is to click on the print button and the print the page with not control buttons but the data will be in the textboxes on that web form. Is there a way of doing this?

推荐答案

根本不需要空白页面进行打印。您可以使用文本框创建本地RDLC报告,然后使用用户在Web表单中输入的数据填充它们。您可以在表单所在的同一页面上使用ReportViewer控件显示报表,也许您可​​以隐藏表单并通过具有打印按钮的查看器显示报表。

或者您可以使用CSS格式化web表单和javascript window.print()
You do not need a blank page for printing at all. You could create a local RDLC report with the text boxes and then fill them using the data entered by the user in the web form. You can display the report using ReportViewer control on the same page where the form is, maybe you can hide the form and display the report through the viewer which has a print button.
Or you can just use CSS to format the web form and javascript window.print()


请参阅下面的链接

在ASP.NET 2.0中打印: -

http://www.dotnetcurry.com/showarticle.aspx?ID=92 [ ^ ]



并仅传递您要以print方式打印的那些控件或数据。
refer below link for
Print in ASP.NET 2.0:-
http://www.dotnetcurry.com/showarticle.aspx?ID=92[^]

and pass only those controls or data that you want to print in print method.


protected void printButton_Click(object sender, EventArgs e)
    {
        ClientScript.RegisterStartupScript(this.GetType(),"PrintOperation","printing()",true);
    }





参考: http://forums.asp.net/t/1561011.aspx [ ^ ]

这可能会有所帮助。



Refer:http://forums.asp.net/t/1561011.aspx[^]
This may help.


这篇关于打印按钮问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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