当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·在nvidia上的opengl问题    »显示摘要«
    摘要: debian sid, nvidia geforce2 mx400, 装了1.0-4191的glx和kernel的驱动,照着readme改了xf86config-4,启动x的时候能看到nv的logo, 但是一遇到用opengl的程序(如gltron),就报错: x error of failed request: glxbadrenderrequest major opcode of fa......
 ·在ado中怎么处理多个结果集    »显示摘要«
    摘要: 服务器端返回多个结果集。怎么能得返回多少个结果集和怎么处理很二个结果集及以后的结果集? ......


怎样给函数传递参数

<asp:button   Text="Excel"   OnClick="Export_Report"   runat="server"   ID="BunExcel"/>  
  <asp:button   Text="Word"   OnClick="Export_Report"   runat="server"   ID="BunWord"/>  
   
  <Script   language="C#"   runat="server">  
  void   Export_Report(Object   Sender,   EventArgs   e){  
  //问题:该函数能否再多加其他参数,怎么调用  
  }  
   
  /*假如我写成这样,那我该怎么调用  
  void   Export_Report(Object   Sender,   EventArgs   e,String   strArgs){  
  //Response.Write(strArgs);  
  }  
   
  </Script>  
   
 

NO.1   作者: Tigatron

此函数的签名无法改变,也就是说不能再多加其他参数。这是由于此函数作为事件处理程序,必须符合一个delegate的签名:  
  delegate   EventHandler(object   sender,EventArgs   e);  
   
  作为替代方案,你可以将要传递的参数改为类的变量,即在<script></script>中直接声明  
  String   strArgs;  
  在你的代码中对其读写即可。

NO.2   作者: Tigatron

in    
  void   Export_Report(Object   Sender,   EventArgs   e)  
   
  the   "object   Sender",as   its   been   called,is   the   sender   of   event,  
  so   you   can   use   (Button)Sender   to   get   it.


    摘要: 各位大虾帮忙:oracle 9i的日志误删了两个,现在只可以加载,不能打开,请问如何解决?谢谢!!! ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE