.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Print button in Asp.Net with C#

Posted By: PAND     Posted Date: February 10, 2014    Points:5   Category :C#
Hi,

I need to print a .docx/.pdf from the project folder.

I tried with the below code but no luck.

ProcessStartInfo info = new ProcessStartInfo(path);
info.Verb = "Print";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(info);

Please suggest me how to proceed.

Thanks&Regards,
Pand.

Responses
Author: abhays             
Posted Date: February 20, 2014     Points: 20   

Check below link

http://msdn.microsoft.com/en-us/library/windows/apps/hh761451.aspx

you can also use itextcsharp dll.

Author: johngates             
Posted Date: March 13, 2014     Points: 20   

I have to print .aspx page on which i have 3 image buttons on the window. these are Print,Export to Excel and Close.
When i click on print image button, then it also print buttons on that page. I am using this code for printing

try tis code

imgBtnPrint.Attributes.Add("onclick", "window.print();");

for more [URL=http://infotuck.com]technology news[/URL]



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend