1
Please, can someone help me with a boring bug with ASP.NET? Next... I have a button:
<asp:Button ID="cadastra" CssClass="btn btn-success btn-lg" runat="server" Text="Cadastrar Cliente" onclick="cadastra_Click1" />
And I have the method cadastra_Click1
protected void cadastra_Click1(object sender, EventArgs e)
{
Response.Write("<script>alert('clockado');</script>");
}
When I try to run the code the compiler brings me the following error:
CS1061: 'ASP.cadcliente_aspx' does not contain a definition for 'cadastra_Click1' and no 'cadastra_Click1' extension method accepts that a first argument of type 'ASP.cadcliente_aspx' is found (you are not using an Assembly guideline or reference?)
I don’t know what else to do.
It worked, but the error continued and I found where it was, it was in a class that had reference with the click event. Thanks for the help! @adrianolsk
– Diego Moreira