How to execute server-side code when clicking a button?