|M| 如何在asp.net程序和WinForm程序之间进行传参
如 
 btnCreateIMG_OnClick() 
 { 
             Int32   imgID=22; 
             ??...      //这里启动服务器C:\CreateIMG.exe 
             img.ImageURL= "imgage22.gif " 
 } 
 -------------------------------------- 
 以下是CreateIMG.exe 
 form1_load 
 { 
             int32   imgID   =   ??..      //这里就是刚才启动这个程序时候传进来的22 
             ...生成图片图片名为image+   imgID   +   .gif 
 } 
 上面的两处??要怎么来写   
 谢谢
------解决方案--------------------没看明白
------解决方案--------------------lz思路没搞清楚
------解决方案--------------------为什么 asp.net要和Winform程序通信?   
 一定要通信,因为是服务器端,你可以用MSMQ 、文件形式、Webserbice等都可以的。 
 另外Windows程序,有一个服务器重新启动后,需要手动运行的过程。所以要考虑下。是否每次都需要人为启动。如果允许用Windows Service+MSMQ+asp.net应该是个好 办法
------解决方案--------------------具体点吧
------解决方案--------------------1,具体的处理完全可以在asp.net里实现,如果exe不是现成的话,不要在asp.net调用exe。 
 2,即使调用,可以使用下面的方法,注意:运行exe 的权限问题!!!!!!!   
 例子 
 a.cs 
 =========== 
 using System; 
 using System.IO; 
 class TestClass 
 { 
     static void Main(string[] args) 
     {    
         using (StreamWriter sw = new StreamWriter( "c:\\Inetpub\\wwwroot\\TestFile.txt "))  
         { 
             for(int i = 0;i <args.Length;i++) 
             { 
             sw.WriteLine(args[i]);             
           } 
         }   
     } 
 }     
 编译成a.exe,放wwwroot下 
 a.aspx代码 
 ============= 
  <%@ Page language= "c# " Debug= "true " %>  
  <%@ Import Namespace =  "System "%>    
  <!DOCTYPE HTML PUBLIC  "-//W3C//DTD HTML 4.0 Transitional//EN " >  
  <HTML>  
  <HEAD>  
  <script runat= "server ">  
 	void Page_Load(object sender, System.EventArgs e) 
     { 
      System.Diagnostics.Process.Start( "cmd.exe ", "/C " + Server.MapPath( "~/ ") +  "\\a.exe 哈哈 okdddddddkk ");       
     } 
  </script>  
  </HEAD>  
  <body>  
    <form id= "HTTPPost " method= "post " runat= "server ">      
    </form>  
  </body>  
  </HTML>    
 运行后在C:\Inetpub\wwwroot看TestFile.txt的内容。   
 一定要注意运行权限!!
------解决方案--------------------学习
------解决方案--------------------LZ的这样设计我感觉是不恰当的
------解决方案--------------------向高人学习