Add a javascript function to the page, the function will be called when you do your action...
<script type="text/javascript">
function ConfirmAction() {
var result = window.confirm("Are you sure you want to do this action?");
return result;
}
</script>
To call the javascript function, use the OnClientClick event of the control...
<asp:button id="btnDoAction" runat="server" text="Do Action" onclientclick="javascript:return ConfirmAction();" />