1.<image src=../print.exe>2.Response.Redirect("../print.exe");

解决方案 »

  1.   

    参考一下它如何C#调用DOS程序,并返回结果
    static void Main(string[] args)
          {
             Process ps=new Process(); 
             ps.StartInfo.FileName=@"C:\NETSTAT.EXE"; 
             ps.StartInfo.Arguments = "-na";
             ps.StartInfo.WindowStyle =      System.Diagnostics.ProcessWindowStyle.Hidden;
             
    ps.StartInfo.UseShellExecute = false;ps.Start();
          }
      System.Diagnostics.Process p = new System.Diagnostics.Process();
             ..........;
             p.StartInfo.RedirectStandardOutput = true;
             p.Start();
             StreamReader sr = p.StandardOutput;
      while(sr.Peek() > -1)
             {
                Console.WriteLine(sr.ReadLine());
             }