日期:2014-05-18  浏览次数:20458 次

DataListCommand不可访问,因为它受保护级别限制
“purchase.cart_editcommand(object,   System.Web.UI.WebControls.DataListCommandEventArgs)”不可访问,因为它受保护级别限制
  <asp:DataList   ID= "DataList1 "   runat= "server "   CellPadding   = "0 "   CellSpacing   = "0 "   BorderWidth= "2 "   BorderColor   = "Gray "   OnEditCommand   = "cart_editcommand ">
        void   cart_editcommand(object   sender,   DataListCommandEventArgs   e)
        {
                DataList1.EditItemIndex   =   e.Item.ItemIndex;
                bindlist();
        }

------解决方案--------------------
如果你使用asp.net1.1,不要写private,写protected。