通過ASP
以下是C#代碼
<%@ Page Language=
<HTML>
<HEAD>
<% @ Import namespace=
<script language=
void Page_Load(Object Sender
btnKill
}
private void KillProcess(string processName){
System
//得到所有打開的進程
try{
foreach (Process thisproc in Process
if(!thisproc
thisproc
}
}
}
catch(Exception Exc)
{
msg
}
}
public void btnKill_Click(object sender
{
KillProcess(procname
msg
}
public void btnShow_Click(object sender
ArrayList procList =new ArrayList();
string tempName=
int begpos;
int endpos;
foreach (Process thisProc in System
tempName=thisProc
begpos = tempName
endpos= tempName
tempName=tempName
procList
}
procname
procname
}
</script>
</HEAD>
<body>
<Basefont Face=
<center><h
<Table cellspacing=
<form id=
<TR><TD><ASP:DropDownList id=
進程名字</TD></TR>
<TR><TD>
<asp:button id=
</TD>
<TD><asp:button id=
</TD></TR>
</TABLE>
<center><asp:Label id=
</form>
</center>
</body>
</HTML>
From:http://tw.wingwit.com/Article/program/net/201311/11805.html