Code Behind
Button1.Attributes.Add('onclick', 'getMessage()')
Client Side
<SCRIPT language=javascript>
function getMessage()
{
var ans;
ans=window.confirm(’Is it your confirmation.....?’);
if (ans==true)
{
document.Form1.hdnbox.value=’Yes’;
}
else
{
document.Form1.hdnbox.value=’No’;}
}
</SCRIPT>
To display the Yes/No value selected by user, in your code behind file:
Response.Write(Request.Form('hdnbox'))
Share with