Hi aakhan314,
Example.exe
static void Main (string [] args)
{
Console.WriteLine(args[0]);
Console.WriteLine(args[1]);
}
Executing the exe with parameters
Namespaces
using System.Diagnostics;
Code
Process process = new Process();
process.StartInfo.FileName = "Example.exe";
process.StartInfo.Arguments = "Dhanmendra 37";
process.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
process.StartInfo.RedirectStandardOutput = true;
process.OutputDataReceived += OutputDataReceived;
process.Start();
process.BeginOutputReadLine();
process.WaitForExit();
Recieve the value
private static void OutputDataReceived(object proc, DataReceivedEventArgs outLine)
{
// Recieve the value here.
Response.Write(outLine.Data);
}