You must see that you have actually have a server side event for this
This button has 2 events one client side and one server side
First it executes client side event and if that returns true it will execute server side code
protected void Button2_Click(object sender, EventArgs e)
This is the Event Method you will find on CS code page.
In your case there is no server event for the button onclick="Button2_Click"