Hi Say showing the confirm box on a button click event then...
Here is the example..
I have button
<asp:Button ID="Button2" runat="server" Text="Button" CausesValidation="false" UseSubmitBehavior="false"/>
Have the javascript in the header section (master page's header)...
<script type="text/javascript">
function showConfirmBox(id) {
if (confirm("You want to proceed?")) {
var ctrl = document.getElementById(id + "_0");
ctrl.checked = "checked";
}
else {
var ctrl = document.getElementById(id + "_1");
ctrl.checked = "checked";
}
}
</script>
In my page_load event i am assign this script to the button and pass the id of the radio button list to the script...
Button2.Attributes.Add("onclick", "showConfirmBox('" + rbtnDataMatch.ClientID + "')");
thats all. Once the button click it show the confirm box and select the radio button accordingly