Here is my C# code in the ASP.NET page.
public static void DoConvert ( string sFile )
{
string cmd = "foo.exe" ;
string param = " /bar.txt" ;
Process myproc ; // <-- Error here
ProcessStartInfo startInfo = new ProcessStartInfo ( cmd , param ) ;
startInfo.CreateNoWindow = true ;
startInfo.WindowStyle = ProcessWindowStyle.Hidden ;
myproc = Process.Start ( startInfo );
//myproc.WaitForExit () ;
myproc.Close() ;
}
When I run it I get:
Compiler Error Message: CS0246: The type or namespace name 'Process'
could not be found (are you missing a using directive or an assembly
reference?)
I think this is because I need:
using System.ComponentModel;
But I can't figure out where to put it. I've tried several places but
still got the error. Any ideas?
Thanks!
--
http://www.vbmark.com/
A good place to start.