如题
解决方案 »
- 在点保存按扭后,页面刷新后,又回到页面的最前面,能否用JS进行定位,JS 页面定位的问题?
- 关于AJAX Extensions 呵呵
- GridView更新时如何把更新前的值和更新后的值取出来
- 关于事务的理解问题
- 一个关于sqldatareader的问题
- 100求:html控件table,在服务器端如何增行和删除行。
- ASP.NET2.0如何动态管理多语言资源文件?
- 如何用ASP.NET在.aspx页面中实现分析图表?(关于OWC)
- 这是不是.net平台的bug哦……真是郁闷啊
- asp.net使用datalist分页实现局部刷新,不能让整个页面一起刷新(急)
- 我在ASP.NET程序中使用AJAX,点击按钮后出现问题
- 如何使用c#在sql server中进行图片格式的文件存取
我的代码是
<script language="JavaScript" type="text/javascript">function dayin()
{
var code=document.all.dayin.innerHTML;
code+="<object id='wb' name='wb' height='0' width='0' classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>"
code+="<input type='button' value='打印机设置' style='border: solid 1px #a3a3a3; background-color: #e6e6e6; font-size: 12px' class='noprint' onclick='javascript:wb.execWB(8,1);' /> <input type='button' value='打印预览' style='border: solid 1px #a3a3a3; background-color: #e6e6e6; font-size: 12px' class='noprint' onclick='javascript:wb.execWB(7,1);' /> <input type='button' value=' 打 印 ' style='border: solid 1px #a3a3a3; background-color: #e6e6e6; font-size: 12px' class='noprint' onclick='javascript:wb.execWB(6,1);' />"
code+="<style media='print' type='text/css'> .Noprint{display:none;} .PageNext{page-break-after: always;} </style>"
var newwin=window.open('','','');
newwin.opener = null;
newwin.document.write(code);
newwin.document.close();
}
</script>
<input type="button" value="打印预览查询内容" onclick="dayin()"/>
<div id="dayin()"><asp:GridView ID="GridView1" runat="server" Font-Size="12px" AllowPaging="true" AllowSorting="true"
OnRowCreated="GridView1_RowCreated" PageSize="10" EmptyDataText="没有符合要求的数据!">
<PagerSettings Mode="NumericFirstLast"></PagerSettings>
</asp:GridView></div>
可是我那个表太长啦 无法在一张纸上呈现 横竖都不行
就想能不能换页打印
谢谢
Width="100%" runat="server" Font-Size="12px" AllowPaging="true" AllowSorting="true"
OnRowCreated="GridView1_RowCreated" PageSize="10" EmptyDataText="没有符合要求的数据!">
<PagerSettings Mode="NumericFirstLast"> </PagerSettings>
</asp:GridView>