Basher Hart

Basher Hart

  • NA
  • 5
  • 939

Form does not contain a definition for method

Jul 18 2016 7:05 AM
Greetings;
 
I've been having this problem for a while and I have tried every solution that was available on
 
the internet but nothing seems to be working for me.
 
This is my Delete.aspx.cs file:
  1. void grd_dataset_RowDeleting(object sender, GridViewDeleteEventArgs e) {  
  2.   

 This is my Delete.aspx:
  1. <asp:GridView ID="GridView1" runat="server" onrowdeleting="grd_dataset_RowDeleting">  
  2.     <Columns>  
  3.         <asp:CommandField ShowDeleteButton="True" ButtonType="Button" />  
  4.     </Columns>  
  5. </asp:GridView> 
 This is the error I'm getting:
 
 Compiler Error Message: CS1061: 'ASP.delete_aspx' does not contain a definition for 'grd_dataset_RowDeleting' and no extension method 'grd_dataset_RowDeleting' accepting a first argument of type 'ASP.delete_aspx' could be found (are you missing a using directive or an assembly reference?)
 

Answers (2)