I have the following button on a .aspx page:
<asp:Button runat="server" ID="bntLogin" OnClick="bntLogin_Click" Text="Login" />
With the following in the .aspx.cs:
protected void bntLogin_Click(object sender, EventArgs e)
{
//
}
When I try to build it I get the following error:
'ASP.reserve_aspx' does not contain a definition for 'bntLogin_Click' and no extension method 'bntLogin_Click' accepting a first argument of type 'ASP.reserve_aspx' could be found (are you missing a using directive or an assembly reference?)
However, when I move the click event from the code-behind to a script block inside the markup it builds.
Any ideas?