Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 30th, 2010, 06:51 AM
Authorized User
Join Date: Aug 2010
Posts: 12
Thanks: 0
Thanked 2 Times in 2 Posts
Default how to show print button in asp.net

how to take print out after clicking a button in asp.net you tell me with code
in asp.net with c#
free web directory :yourowndir.com
seo service india : sbglobal.info
  #2 (permalink)  
Old August 30th, 2010, 07:50 AM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts

Please check the following article
Om Prakash Pant
Click the "Thanks" button if this post helped you.
  #3 (permalink)  
Old August 30th, 2010, 02:22 PM
Friend of Wrox
Points: 1,749, Level: 16
Points: 1,749, Level: 16 Points: 1,749, Level: 16 Points: 1,749, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2007
Location: San Diego, CA, USA.
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts

In the first place, I would recommend against using a print button. Support cross-browser can be flaky, and 99% of users are already looking at a much easier, much more reliable Print button (complete with printer icon) on their browser window. IMO adding a print button to a webpage is unnecessary duplication that can leave users clicking on your custom button over and over in a case where their browser doesn't support it. If you simply don't give users the option, then they can much more comfortably print your page exactly the same way they do in every other program.

However, if you still want to do it, you need to understand that printing is a client side job. C# applications that have a print button, simply serve a page with different styles that are printer friendly when the normal page template is a printer's nightmare.

Managing printing however, if you actually want to trigger the printer has to be done with code that the client's browser can process. Browsers don't understand C# which is why it's a server-side language. Therefore you need a client-side programming language and there's only one that works cross-browser, Javascript.

Try searching for some articles on javascript and printing. I'm sure you'll turn up tons of stuff if you really want to do that.

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.

Last edited by chroniclemaster1; August 30th, 2010 at 02:28 PM..

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Print A Txt File in AsP.net msridharps ASP.NET 2.0 Basics 0 December 16th, 2008 04:40 AM
To show 2 footers in a asp.net 1.1 datagrid contro daffodils ASP.NET 1.0 and 1.1 Professional 0 November 20th, 2006 05:54 AM
Print file at client side in asp.net manish.sharma04 ASP.NET 2.0 Basics 0 April 4th, 2006 08:46 AM
Database unable to show result. (ASP.NET C#) richie86 ASP.NET 1.0 and 1.1 Basics 3 November 10th, 2005 01:59 PM

All times are GMT -4. The time now is 07:01 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.