Posts Tagged ‘ ASP.NET Validations ’

Javascript Confirmation with ASP.NET Validations

It was difficult for me to find out how to use submit confirmation while using ASP.NET validations in Web Form. This following one is the Java Script Function to be used.

   function ConfirmSubmit() {

        if (Page_IsValid) {

            return confirm('Do you want add this User?');

        return Page_IsValid;

Use it this way with your Submit Button.

onclientclick="return ConfirmSubmit();"

A Rahim Khan