I keep getting this error popping up every time I try to run a page on my website...
\'ASP.business_aspx\' does not contain a definition for \'submitSearchClick\' an
Is there a corresponding business.aspx.designer.cs
file that is out of sync? Try changing a property on the control from within the designer. Need more information otherwise.
Let the mark up generate the event handler itself. Back up your event handler contents. Delete the on click event handler in the code behind and its attribute in the markup. Retype the on click attribute in the mark up but this time choose the create a new event option from Visual studio Intellisense. This will create an event like this in the code behind.
protected void submitSearch_Click(object sender, EventArgs e)
{
}
This usually fixes a corrupt designer file.Clean and rebuild your solution and now the event will be wired to the button.
Alternatively , delete the onclick attribute in the mark up and its handler in code behind.Then right click the button in the designer, and on the onclick event, on its properties(accessed by clicking the lightning icon), regenerate the event handler.