Click here to Skip to main content
15,606,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Good Afternoon to all,

In my project i have a requirement when i click on the create button it will diplay a confirmation box like "u want create" if i click on yes tha data will be saved into database,otherwise it will be not saved in database.i used javascript and got but i have problem with that i clicked even no button also it will saved in database,so pls help me how to display confirmation box and after clicking yes only the data will be saved into database?

Thanks in advance.......
Updated 30-Sep-12 23:30pm
Abhijit Parab 1-Oct-12 5:32am    
what code you have used for that? please mention here.

confirmation box with yes no
For this, you would need VBScript confirm instead of Javascript. Javascript gives, Ok & Cancel as options whereas VBScript will give you Yes & No.
Please find the link below that has all the options and will help you out: Alerts, Confirms and Prompts [^]


you can try jQuery modal-dialog or UI-confirm-dialog and configure it for yes-no option.
How to Create a jQuery Confirm Dialog Replacement[^]
ASP.NET jQuery UI confirm dialog [^]
ASP.NET JQuery Confirm Dialog[^]


you can use Ajax ModalPopupExtender for it.
Refer: ASP.NET confirmation box with yes/no button options using modalpopup[^]

..and more similar QA on CP Search[^]
Share this answer
u didn't mentioned in which language u r working..

just go through this link..hope u will get the solution[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900