ConfirmButtonExtender cannot be used conditionally and hence you need to use JavaScript
Please refer this HTML code
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<script type="text/javascript">
function Continue() {
var name = document.getElementById("txtName").value;
var city = document.getElementById("txtCity").value;
var country = document.getElementById("txtCountry").value;
if (name == "" || city == "" || country == "") {
if (confirm('Do you want to continue without entering the details? ')) {
return true;
}
else {
return false;
}
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
Name
</td>
<td>
<input id="txtName" type="text" name="name" />
</td>
</tr>
<tr>
<td>
City
</td>
<td>
<input id="txtCity" type="text" name="name" />
</td>
</tr>
<tr>
<td>
Country
</td>
<td>
<input id="txtCountry" type="text" name="name" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<button onclick="return Continue();">
Continue</button>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Demo
If you are having the server control then use this javascript
<script type="text/javascript">
function Continue() {
var name = document.getElementById("<%=txtName.ClientID %>").value;
var city = document.getElementById("<%=txtCity.ClientID %>").value;
var country = document.getElementById("<%=txtCountry.ClientID %>").value;
if (name == "" || city == "" || country == "") {
if (confirm('Do you want to continue without entering the details? ')) {
return true;
}
else {
return false;
}
}
}
</script>