I use below code for print from Page but doesn't work (means when i click on print button nothing happen). the function doesn't call
<script type="text/javascript">
function printing() {
window.print();
}
</script>
protected void print_Click(object sender, EventArgs e)
{
btnPrint.Attributes.Add("onclick", "return printing()");
}
Try this way:
<asp:Button ID="print" runat="server" Text="Print" OnClientClick="javascript:window.print();" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With