Friday, March 16, 2012

On Button click Print Form

Hi all,

In my asp.net page there is one form which is fill by user after filling form he will take the print out of that form

now how i canprint that form on button click and i want thatuser can not save and copy that formonly he can take print out of that form

after filling that from i am showing its all information in next page . how i can do underline task.

help me to perform this task

regard

happy Diwali

Perhaps you only allow the user print the webpage with print button and copy or save the content is not permitted .

In fact although you can disable the select, copy or save action with javascript, user can do some minor modification to html code to enable all the actions . Sad


hi yyy8347

how i can print the form on button click


Easiest way is to call javascript method:

<input type="button" value="Print this page"onClick="window.print()">


how can you make the print button invisible...my problem is that the print button is included during printing

There are event that happen before and after the print is called on the page.. You can write code to hide/show the print button during those events..\

http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onbeforeprint.asp

http://msdn.microsoft.com/workshop/author/dhtml/reference/events/onafterprint.asp

0 comments:

Post a Comment