Agreed you should code like this in 4.0:-
<asp:button onclientclick="return confirm('Are you sure, you want to continue?');" runat="server" id="btnTest" onclick="btnTest_Click" text="Click Here" xmlns:asp="#unknown" />
As you can see in latest version we are getting both "onclientclick" and "onclick" events to handle. "onclientclick" will handle the client side click event.
So on click first the clientside code that will show the confirm box, if you click ok it will move next to serverside code where you do whatever you wanted to do or else this will cancel the server side click event by returning false.
Hope this will be of help to you.