G
George Lake
Hi,
I need to run a few commands from the shell and display the output via ASP
(VB)
Any ideas?
I need to run a few commands from the shell and display the output via ASP
(VB)
Any ideas?
Swanand Mokashi said:ASP or ASP.NET ?
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
Swanand Mokashi said:Here is a sample in C# -- you can use it in business layer and the output
below can be shown on the ASP.NET page
//-----------------Start
/ #start a new process
Process p = new Process();
// #tells operating system not to use a shell;
p.StartInfo.UseShellExecute = false;
//#allow me to capture stdout, i.e. results
p.StartInfo.RedirectStandardOutput = true;
//Say DOS Command is [EXEPath] CONNECT anotherargument
p.StartInfo.Arguments = "CONNECT anotherargument";
p.StartInfo.FileName =[EXEPath];
//#do not show MSDOS window
p.StartInfo.CreateNoWindow = true;
//#do it!
p.Start();
System.Int32 _processID = p.Id;
//#capture results
string output = p.StandardOutput.ReadToEnd(); // this is the output from
the command
//#wait for all results.
p.WaitForExit();
p.Close();
//-----------------End
HTH
--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)
http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...
http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
George Lake said:ASP.NET
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.