With ASP.NET, how do I prompt the user for a yes/no question and getting the result back to my .ascx?
So far I can open a confirmation dialog with use of Javascript,
Another option is to show yes/no:
<script>
function AlertFunction() {
if (confirm('Are you sure you want to save this thing into the database?')) {
$('#ConfirmMessageResponse').val('Yes');
} else {
$('#ConfirmMessageResponse').val('No');
}
}
</script>
to handle it from .net side:
string confirmValue = ConfirmMessageResponse.Value;
if (confirmValue == "Yes")
{...}