You cannot run an .exe file on your website. You can however, stream that file down to the client but a security issue would pop up letting the user know that you're passing an executable file to the computer which might cause a havoc in the system.
Somehow, there is an applet in HTML that can host a java application in it. So, you can run that Java application in your website, but .exe file is not runnable.
But, if you wanted to execute a command on the server, or run a process inside your server on any event on the website, you would use the
System.Diagnostics.Process.Start("fileName.exe");
But I believe, you can pass down the parameters to your application, execute it there, and bring back the results you're trying to show to the user. This is also of a very low chances to execute on the client if you have had to execute on client, because clients
might not have that executable on their end.
It is still not impossible, and can be executed on the user's end if and only if know the location of the executable on the cline't computer. For example, according to this
answer[
^] of SO, this code of ActiveX
<a href="javascript:LaunchApp()">Launch the executable</a>
<script>
function LaunchApp() {
if (!document.all) {
alert ("Available only with Internet Explorer.");
return;
}
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("C:\\Windows\\notepad.exe");
}
</script>
would run that application you pass.