Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi..,
How to Show Confirmation message before saving data and also show information message after saving data within a save button click .
Posted

You need to use javascript ConfirmBox[^] for confirmation before saving and AlertBox[^] to show the notification after saving.

---Amit
 
Share this answer
 
Comments
Sravanthid28 16-May-13 1:45am    
Before showing Conformation message I want to check all validations .if all validations are correct then only I have to show confirmation box
_Amy 16-May-13 1:49am    
You would need to use client side page property: Page_IsValid
Check this similar discussion[^]
Sravanthid28 16-May-13 1:59am    
But I'm using Razor View engine there is no page_Isvalid Property .and I also tried ModelState.IsValid property it's also not working in view
_Amy 16-May-13 2:05am    
Call a javascript on click of save button. In that you check for Page_IsValid property.
In View

XML
<input type="button" value="ClickMe" onclick="callFunction();" />

<script type="text/javascript">
    function callFunction() {
        //here u can perform Validation Operations
        //here u can show Confirmation message by using Alert or jquery dialog
        $.ajax({
            url:// save action url
           type://
           data:
           .
           .
        success: function(data){
            //here
            //after saving data u can also show Confirmation message by using Alert or jquery dialog
        },
        error: function(e){
            debugger;
        }
        });
    }
</script>
 
Share this answer
 
v2

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