-2

I have an asp.net web page named "Details.aspx". In that I have two labels named: "First Name" and "Last Name". I have two textbox for inserting values. I have a button named "Print" When I click on Print button,how can i print the values entered in the textbox.

For eg:The final print should look like:-

Your First Name Is:Mathew
Your Last Name Is:Thomas

IAbstract
  • 19,551
  • 15
  • 98
  • 146
mathewtinus
  • 49
  • 2
  • 10
  • 1
    I am guessing that you are getting down-voted due to lack of code depicting what you have already tried. ;) – IAbstract Aug 29 '12 at 22:32

1 Answers1

2

What you can do is have a printer-friendly version of your page which has the content in the desired format When you click on the Print button, open that page in a new window (you can use the window.open JavaScript). Inside that page, call the window.print JavaScript function which will bring up the browser's Print dialog box.

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
Shyju
  • 214,206
  • 104
  • 411
  • 497