TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
selvi subramanian
NA
799
572.8k
print is not coming in asp.net
Jul 4 2014 7:12 AM
<script type = "text/javascript">
function PrintPanel() {
var panel = document.getElementById("printtbl");
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>
my source code is
<table id="printtbl" style="border-style: groove; border-width: thin; background-color: Black;" align="center" width="50%">
<caption><br /> <asp:Label ID="Label15" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="#1D599E" Text="Bramandam Family Shop"></asp:Label> <br />
<asp:Label ID="Label43" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="#1D599E" Text="Cash Voucher"></asp:Label><asp:Label ID="Label57" runat="server" Font-Bold="True" Font-Size="X-Large" ForeColor="#1D599E"></asp:Label> </caption>
<tr><td align="right" colspan="2"> <asp:Label ID="Label16" runat="server" Text="Date" ForeColor="White"></asp:Label>
<asp:Label ID="Label17" runat="server" ForeColor="White"></asp:Label></td></tr>
<tr><td align="center">
<asp:Label ID="Label26" runat="server" Text="ID" ForeColor="White" Width="70px"></asp:Label> </td><td >
<asp:Label ID="Label27" runat="server" ForeColor="White"></asp:Label></td></tr>
<tr><td align="center" class="style1">
<asp:Label ID="Label18" runat="server" Text="Section" ForeColor="White"></asp:Label></td>
<td class="style1"> <asp:Label ID="Label19" runat="server" ForeColor="White"></asp:Label></td></tr>
<tr><td align="center"> <asp:Label ID="Label20" runat="server" Text="Details" ForeColor="White"></asp:Label></td><td >
<asp:Label ID="Label21" runat="server" ForeColor="White"></asp:Label></td></tr>
<tr><td align="center">
<asp:Label ID="Label22" runat="server" Text="Cash" ForeColor="White"></asp:Label></td><td >
<asp:Label ID="Label25" runat="server" ForeColor="White"></asp:Label></td></tr>
<tr><td colspan="2" ><asp:Label ID="Label23" runat="server" Text="Cashier" ForeColor="White"></asp:Label></td></tr>
<tr><td colspan="2" align="right"><asp:Label ID="Label24" runat="server" Text="Signature" ForeColor="White"></asp:Label></td></tr>
</table>
Reply
Answers (
1
)
i need to save the data automatically in asp.net
warning message (code not find)