The click event gets executed only when you click the button. if the visible property of the button is false how will you click the button and how could the event be executed.
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button"/>
protected void Button1_Click(object sender, EventArgs e)
{
Button1.Visible = false;
}
}
this is what should be executed.