C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Code for print in c#


Posted Date: 20 Aug 2008      Total Responses: 3

Posted By: jeeva       Member Level: Silver     Points: 1


hello every one,

I need a code for printing the data

For example

The patient Record is viewed , and if we like to print it

I give one button, when i click it, the data which are viewed are come in print

for this give me a code

or plz show the syntax for print

or the method for the print




Responses

Author: ANIL PANDEY    20 Aug 2008Member Level: DiamondRating:     Points: 2
hi,


u can use the Javscript function


Window,Print()

to print the document.


Thanks
Anil


Author: jeeva    20 Aug 2008Member Level: SilverRating:     Points: 3
excuse me,

i am new to this

I dont know javascript

i need as

i just click the button event

the printout will be process

plz give the code in c# to the print the data's displayed in the "patientreport.aspx".

ok




Author: Kumar    20 Aug 2008Member Level: GoldRating:     Points: 6
Hi jeeva,

for printing in C# u need to add javascript in Button control something like this ,

In the Button_Click
{
ClientScript.RegisterStartupScript(typeof(Page), "Display", "<script>window.print();</script>");
} copy and paste this code.It will works.IN C# web application no page setting coding is there u need to design the page that should be good appearing after the page is print.
use dreamweaver to design the page.
after u use this code in button_clik print the page the print page will show the URL name ,print date,Title in the bottom .if u want to avoid that,In the IE page goto file-->PageSetUp-->Clear the Header and Footer .Now it not display the header and footer while printing .

Hope this will help u,
need help reply me ,
dhilip.kannan@yahoo.co.in



Post Reply
You must Sign In to post a response.
Next : Generics..?
Previous : question very urgent.
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

it support

Contact Us    Privacy Policy    Terms Of Use