【问题标题】:ASP.Net Not to Print ButtonASP.Net 不打印按钮
【发布时间】:2013-03-07 05:42:32
【问题描述】:

我的 ASP.Net 页面中有一个申请表。我想在用户单击按钮时打印此页面。但不幸的是,那个触发按钮印在了纸上。我怎样才能摆脱那个按钮?

【问题讨论】:

标签: asp.net events printing


【解决方案1】:

使用 print css 并在打印表单时使用此样式表隐藏按钮。

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

在你的 aspx 中:

<asp:Button id="btn" runat="server" CssClass="button-c"/>

在 print.css 文件中添加

.button-c {display:none !important;}

【讨论】:

  • 感谢您的帮助。它帮助了我。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-07-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多