954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

print page in c# .net

hi,
can any one tell me how to i print a page in c#.net.
actually i need it to print receipt in my project.
Help me.
Thanx in advance

kool.net
Light Poster
28 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

Try it with javascript

window.print();

chandru7
Junior Poster in Training
72 posts since Sep 2009
Reputation Points: 9
Solved Threads: 13
 

i dnt knw javascript
can u provide me some code

kool.net
Light Poster
28 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

Search Google.
I found this among many others.

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

function print()
{
window.print();
}

It will print the current document contents.

chandru7
Junior Poster in Training
72 posts since Sep 2009
Reputation Points: 9
Solved Threads: 13
 

i m working on windows application , then where is the code of button.
i think its print the full document of page including buttons, but i dnt want to print buttons of page. pls. help

kool.net
Light Poster
28 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

Read post #4 again, click on the blue word : this

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

Have a look through this I've just done the same function and it helped alot.

ChrisHunter
Posting Whiz in Training
276 posts since Feb 2011
Reputation Points: 36
Solved Threads: 28
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: