Live Chat Icon For mobile
Live Chat Icon

How to get the confirmation of Yes/No from a javascript pop-up and display the value on the page

Platform: ASP.NET| Category: Client Side Scripting

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) 

To display the Yes/No value selected by user, in your code behind file:


Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.