ti basta mettere nel tag del button OnClick="tua_funziona" e in questa funzione fare tutto quello che vuoi.