You can use JavaScript confirm box
You need to add confirm box on OnClientClick event of button .when a user response to first confirm box then catch the result of first confirm box .pop up second confirm according to response .
save second confirm box values in hidden field and use that to execute your C# function in code behind
suppose you have one hiddenfield name hdnconfirm
In your aspx file
<asp:Button ID="btnInvoke" runat="server" Text="Click"
onclick="btnInvoke_Click" OnClientClick="return confirmation();" />
<asp:HiddenField ID = "hdnconfirm" runat="server" Visible="true" />
in head section of your asp page
<script type="text/javascript" language="javascript">
function confirmation() {
var FirstConfirmResult = confirm("Click yes to proceed else Cancel");
if (FirstConfirmResult == true)
{
var SecondConfirmResult = confirm("This is second confirm box ");
if (SecondConfirmResult == true )
{
document.getElementById('hdnconfirm').value = "Yes";
}
else
{
document.getElementById('hdnconfirm').value = "No";
}
}
}
</script>
Use this hdnconfirm.value in code behind to execute your function
protected void btnInvoke_Click(object sender, EventArgs e)
{
if (hdnconfirm.value == "Yes")
{
Do some processing here
}
}
Hope This is what you need !