后台代码:
1 using System.Diagnostics;
2
3 protected void Button1_Click(object sender, EventArgs e)
4 {
5 Process process = new Process();
6 process.StartInfo.FileName = "notepad.exe";
7 process.Start();
8 }
2
3 protected void Button1_Click(object sender, EventArgs e)
4 {
5 Process process = new Process();
6 process.StartInfo.FileName = "notepad.exe";
7 process.Start();
8 }
其中notepad.exe是记事本的进程,也可以打开IE浏览器等进程,例如IE:iexplore.exe
关闭进程的方式是:process.close();