Hi,
Try this:
In .aspx file
<form runat="server">
<asp:button id="btn1" runat="server" onclientclick="confirming();" onclick="btn1_Click" text="Submit" xmlns:asp="#unknown" />
</form>
<script type="text/javascript">
function confirming() {
document.getElementById('<%=confirmValue.ClientID%>').value = confirm('Yes or no?');
}
</script>
In .aspx.cs file:
protected void btn1_Click(object sender, EventArgs e)
{
string confirmValueStr = confirmValue.Value;
bool confirmValueBool;
if (bool.TryParse(confirmValueStr, out confirmValueBool)
{
}
else
{
}
}
Hope this helps.