Click here to Skip to main content
15,941,690 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
want a simple confirm box using javascript,/jquery/extjs with yes/no buttons

Java script
if (confirm("your message"))
             return true;
             return false;
Share this answer
ASP.Net doesn't have it's own confirm/alert boxes. You can either use javascript for a simple confirm box or if you want fancy ones then go for jQuery; other than that you can create your custom dialogs using ASP.Net.
Share this answer
CHill60 31-Aug-13 18:58pm    
OP didn't mention - they specifically said "using javascript,/jquery/extjs"
idenizeni 31-Aug-13 19:09pm    
Actually the post's title says, 'want confirm boxes in'.
Add a javascript function to the page, the function will be called when you do your action...
<script type="text/javascript">
    function ConfirmAction() {
        var result = window.confirm("Are you sure you want to do this action?");
        return result;

To call the javascript function, use the OnClientClick event of the control...
<asp:button id="btnDoAction" runat="server" text="Do Action" onclientclick="javascript:return ConfirmAction();" />
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