locked
Error - No overload for 'lvHoliday_ItemInserting' matches delegate 'System.EventHandler<System.Web.UI.WebControls.ListViewInsertEventArgs>' RRS feed

  • Question

  • User-1499457942 posted

    Hi

    <asp:ListView ID="ListCategories" runat="server" DataKeyNames="No" InsertItemPosition="LastItem"
    OnItemCanceling="lvHoliday_ItemCanceling" OnItemCommand="lvHoliday_ItemCommand"
    OnItemDeleting="lvHoliday_ItemDeleting" OnItemEditing="lvHoliday_ItemEditing"
    OnItemInserting="lvHoliday_ItemInserting" OnItemUpdating="lvHoliday_ItemUpdating">
    <EditItemTemplate>

    Thanks

    Monday, July 23, 2018 6:31 PM

All replies

  • User475983607 posted

    You forgot the lvHoliday_ItemInserting in the code behind.  Make sure the case is correct.

    Please take a moment to review your code...

    Monday, July 23, 2018 6:49 PM
  • User283571144 posted

    Hi JagjitSingh,

    According to your description, I guess there are something wrong with your lvHoliday_ItemInserting event.

    For example, you missed the method's parameter in the lvHoliday_ItemInserting event.

    Like below:

            protected void ListCategories_ItemInserting( )
            {
    
            }

    It will show below error:

    The right lvHoliday_ItemInserting method:

            protected void ListCategories_ItemInserting(object sender, ListViewInsertEventArgs e)
            {
    
            }

    Best Regards,

    Brando

    Tuesday, July 24, 2018 2:56 AM