I have a form with two buttons in ASPX page. One to print with the user input and the other to print empty form. I used ‘window.print()’ event to print form with user input. How can i print the empty form, even though if user has entered something in the form when user clicks on other print button?
Share
Well, you generate an html for blank form – (you can use different page or use the same ASPX page) and open it in a different window and issue window.print() within.
If you don’t want to open new window then open the page in
iframeand issuewindow.print()for iframe. If you don’t want this to be visible then keep the iframe size as 1×1 px or position the iframe (or container div) in negative left/top coordinates.