如题: 
我的源代码如下: 
<asp:DataList ID="TuSeeDlt" runat="server" Style="width: 90%" BorderStyle="none" BorderWidth="1px" CellPadding="3" GridLines="horizontal" OnEditCommand="TuSeeDlt_EditCommand"> 
    <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" /> 
    <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" /> 
    <ItemTemplate> 
    <table style="width: 100%;" cellspacing="0"> 
      <tr style="width: 100%;"> 
      <td style="vertical-align: middle; height: 26px; text-align: right;"      colspan="5">                                      
          <asp:LinkButton ID="Delect" runat="server" CausesValidation="false" 
          CommandArgument=' <%# DataBinder.Eval(Container.DataItem, "tutor_ID")%>' 
              CommandName="Delect">删除 </asp:LinkButton>                                      
      </td> 
    </tr> 
    </table> 
  </ItemTemplate> 
  <AlternatingItemStyle BackColor="#F7F7F7" /> 
  <ItemStyle BackColor="White" ForeColor="#4A3C8C" /> 
  <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" /> 
</asp:DataList> protected void TuSeeDlt_EditCommand(object source, DataListCommandEventArgs e) 
    { 

单击"删除"为什么不能激发TuSeeDlt_EditCommand事件

解决方案 »

  1.   

    http://topic.csdn.net/u/20081026/21/6649dd19-8efe-4822-a5f0-1728300b979b.html前一个帖子已经有很多人回答了。
      

  2.   

    上个帖子说的很明白了
    <asp:LinkButton ID="Delect" runat="server" CausesValidation="false" 
              CommandArgument=' <%# DataBinder.Eval(Container.DataItem, "tutor_ID")%>' 
                  CommandName="Delect">删除 </asp:LinkButton>  
    改为:
    <asp:LinkButton ID="Delect" runat="server" CausesValidation="false" 
              CommandArgument=' <%# DataBinder.Eval(Container.DataItem, "tutor_ID")%>' 
                  CommandName="Edit">删除 </asp:LinkButton>  如果要激发这个事件(以你的理解是不是这一行为编辑状态?)
    你要在
    public void TuSeeDlt_EditCommand(object 参数,  e参数)
    {
    e.item.itemindex=-1;
    }另外如果你想要更新DATALIST里面的内容的话
    再在DATALIST中建立一个EDITITEMPLE编辑模板才行
    他的CommandName是UPDATE才行
    代码在public void TuSeeDlt_UpdateCommand(object 参数,  e参数)里面编写
      

  3.   

    楼主的逻辑就有问题要Delete去引发编辑?而且还有拼写错误
      

  4.   

    CommandName="Delect"
    ====>
    如果是删除的话: CommandName="Delete"
    如果是编辑的话: CommandName="Edit"
    如果是取消的放: CommandName="Cancel"