print documents without opening MS Word using C#
1. using namespace in aspx page :
" using System.Diagnostics; "
2. write this on any action control like Button, chkbox etc....
C# Code.....
string filePath = "D:\\Atit\\sample.doc";
ProcessStartInfo info = new ProcessStartInfo(filePath);
info.Verb = "Print";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(info);
Response.Write("printed !");
finally , build & run ur Apllcation......
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment