日期:2014-05-20  浏览次数:20440 次

WEB页打印问题
<%@   Page   Language= "C# "   AutoEventWireup= "true "   CodeFile= "DataToPrint.aspx.cs "   Inherits= "DataToPrint "   %>

<html   xmlns= "http://www.w3.org/1999/xhtml "   >
<head   runat= "server ">
        <title> 无标题页 </title>
</head>
<body>
        <form   id= "form1 "   runat= "server ">
        <div>
                <table   style= "width:   149px ">
                        <tr>
                                <td   colspan= "3 "   rowspan= "3 "   style= "height:   115px ">
                                        <asp:GridView   ID= "GridView1 "   runat= "server "   AllowPaging= "True "   AutoGenerateColumns= "False "
                                                DataSourceID= "SqlDataSource1 "   Height= "134px "   PageSize= "5 "   Width= "255px ">
                                        </asp:GridView>
                                </td>
                        </tr>
                        <tr>
                        </tr>
                        <tr>
                        </tr>
                </table>
                <asp:SqlDataSource   ID= "SqlDataSource1 "   runat= "server "   ConnectionString= " <%$   ConnectionStrings:pubsConnectionString2   %> "
                        SelectCommand= "SELECT   *   FROM   [authors] "> </asp:SqlDataSource>
                &nbsp;
                        <p>
                        <OBJECT   id=WebBrowser   classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2   height=0   width=0>  
</OBJECT>  
                <input   id= "Button1 "   type= "button "     onclick=document.all.WebBrowser.ExecWB(7,1)   value= "打印 "   />
<br   />
</p>