I have a button in my asp.net page ,when clicked should execute the following DOS command
TYPE SOMEFILENAME.TX T>PRN
i.e. the dos print command.
i have come across some code which i have tried but does not work. i am putting the code below:
i wanna what is the problem with the above code and if there is any other alternative plz do help me.
TYPE SOMEFILENAME.TX T>PRN
i.e. the dos print command.
i have come across some code which i have tried but does not work. i am putting the code below:
Code:
Process proc = new Process(); proc.StartInfo.UseShellExecute = false; proc.StartInfo.FileName = "cmd"; proc.StartInfo.Arguments = "c:\\MCX_CONTRACT\\scrip.txt>prn"; proc.StartInfo.RedirectStandardOutput = true; proc.Start(); proc.WaitForExit();
Comment