在aspx中定义<asp:datalist id="teamlist" runt=server>
在aspx.cs中:
委托:this.teamlist.ItemCommand +=new System.EventHandler (this.teamlist_itemcommand );
方法:private void teamlist_itemcommand(object sender,System.Web.UI.WebControls.DataListCommandEventArgs e){}
问题:C:\Inetpub\wwwroot\wroxUnited\Teams.aspx.cs(91): 方法“wroxUnited.Teams.teamlist_itemcommand(object, System.Web.UI.WebControls.DataListCommandEventArgs)”与委托“void System.EventHandler(object, System.EventArgs)”不匹配
在aspx.cs中:
委托:this.teamlist.ItemCommand +=new System.EventHandler (this.teamlist_itemcommand );
方法:private void teamlist_itemcommand(object sender,System.Web.UI.WebControls.DataListCommandEventArgs e){}
问题:C:\Inetpub\wwwroot\wroxUnited\Teams.aspx.cs(91): 方法“wroxUnited.Teams.teamlist_itemcommand(object, System.Web.UI.WebControls.DataListCommandEventArgs)”与委托“void System.EventHandler(object, System.EventArgs)”不匹配
protected void ItemCommand(Object source , System.Web.UI.WebControls.DataGridCommandEventArgs e)绑定事件的时候,应该如下:
this.teamlist.ItemCommand +=new DataListCommandEventHandler (this.teamlist_itemcommand );
怎么是datagridcommandeventargs呢?