<!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> <!-- Web.Config Configuration File --> <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> </configuration>
<script type = "text/javascript"> function PrintPanel() { var panel = document.getElementById("<%=pnlContents.ClientID %>"); var printWindow = window.open('', '', 'height=400,width=800'); printWindow.document.write('<html><head><title>DIV Contents</title>'); printWindow.document.write('</head><body >'); printWindow.document.write(panel.innerHTML); printWindow.document.write('</body></html>'); printWindow.document.close(); setTimeout(function () { printWindow.print(); }, 500); return false; } </script>
<asp:Panel id="pnlContents" runat = "server"> ------------------ -----------------Data for Printing ---------------- </asp:Panel> <asp:Button ID="btnPrint" runat="server" Text="Print" OnClientClick = "return PrintPanel();" />
web.config
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)