请教各位高手,看看这个ASP.NET程序是怎么了?
程序代码:
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Page Language="VB" Debug="true" %>
<HTML>
<script language="VB" runat="server">
Dim p As New Process()
p.StartInfo.FileName= "netstat.exe"
p.StartInfo.Arguments="-n"
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = True
p.Start()
</script>
</HTML>
运行以后出错,提示:
编译器错误信息: BC30188: 需要声明。
源错误:
行 5: <script language="VB" runat="server">
行 6: Dim p As New Process()
行 7: p.StartInfo.FileName= "netstat.exe"
行 8: p.StartInfo.Arguments="-n"
行 9: p.StartInfo.UseShellExecute = False
源文件: E:\Site\test.aspx 行: 7
显示详细的编译器输出:
……
E:\Site\test.aspx(7) : error BC30188: 需要声明。
p.StartInfo.FileName= "netstat.exe"
~
E:\Site\test.aspx(8) : error BC30188: 需要声明。
p.StartInfo.Arguments="-n"
~
E:\Site\test.aspx(9) : error BC30188: 需要声明。
p.StartInfo.UseShellExecute = False
~
E:\Site\test.aspx(10) : error BC30188: 需要声明。
……
晚辈想通过页面调用exe文件,并将输出结果返回页面,不知道怎么解决这个问题,希望各位高手指点,谢谢各位了。