Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I have a format of a coupon which consists of name, value and Validity fields to be printed on a pdf or a word from the printer selected.
I am able to print it in a single document single time.

But what if I need to print the same format multiple times in a single page.

I am taking the values of name, value and validity from datatbase.

This is what I got so far:

VB
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Button1.Attributes.Add("onClick", "window.print()")
End Sub


But using this I can print one time in one page.
Posted
Updated 5-Nov-10 21:36pm
v2

1 solution

VB
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        For GetCounter = 0 TO StopCounter 
        Button1.Attributes.Add("onClick", 
"window.print()")
        Loop
End Sub
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900