<script type="text/javascript">
function confirmation() {
var answer = confirm("do you want to delete?")
if (answer){
document.getElementByID("hdnValue").value='true';
}
else{
document.getElementByID("hdnValue").value='false';
}
}
</script>
ScriptManager.RegisterStartupScript( this, typeof(Page), "confirm", "<script>confirmation();</script>", false);
now you can access the value of hdnValue hiddenField control value further.