Sophie
Sophie

Reputation: 51

error for click events

i am getting an error

Line 31:

<asp:LinkButton ID="company" runat="server"  OnClick="company_Click">Companies
Management</asp:LinkButton><br />

that 'ASP.default_master' does not contain a definition for 'company_Click' whereas the code i have written is with the ID companies as

   protected void companies_Click(object sender, EventArgs e)
   {
       Response.Redirect("Companies.aspx");
   }

THe ID company was for a link button that i deleted. i put a new link button with id as companies and wrote this code but i still get the old error. how do i rectify this?

Upvotes: 0

Views: 63

Answers (1)

Edgar Hernandez
Edgar Hernandez

Reputation: 4030

It seems you still have a control that have a event handler associated to the old 'company_Click'.

Try searching for 'company_Click' in all your solution to get rid of it.

Upvotes: 4

Related Questions