Show (Display) Yes No prompt message using JavaScript in ASP.Net

Bhavesh23
 
on Dec 25, 2020 10:50 PM
647 Views

How to code prompted message which ask "are you sure you want to save record?" in c# web.

If press yes it should be store record. If press no it should be not store record in database using c# web application.

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Bhavesh23
 
on Dec 30, 2020 04:50 AM
Bhavesh23 says:

how to code prompted message which ask "are you sure you want to save record ?" in c# web.

if press yes it should be store record. if press no it shoud be not store record in database.

using c# web application.

its done... The Solutions is here...

<asp:button "server" ID="btnSave" Text="Save" CssClass="GreenLightButton"    
    OnClick="BtnSave_Click" OnClientClick="if ( ! SaveConfirmation()) return false;"/>    
  
function SaveConfirmation() {
    return confirm("Are you sure you want to Save Recordr?");
}