Click here to Skip to main content
15,893,337 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
This is my code

JavaScript
<script type="text/javascript">
     $(".btnA").live("click", function () {
            $(".btnA").hide();
            $("#dialog").dialog({
                title: "Password Confirm !",
                buttons: {
                    Ok: function () {
                        $("[id*=btnProcess]").click();
                    },
                    Close: function () {
                        $(this).dialog('close');
                    }
                },
            });


            return false;
            $("#dialog").validate({
                rules: {
                    Password: {
                        required: true,
                        equalTo: "#Password2"
                    }
                },
                messages: {
                    Password: {
                        required: "Password riquired!",
                        equalTo: "Error. Type a gain"
                    }
                }
            });
   });
</script>


And HTML

ASP.NET
<div id="dialog">
<input id="Password" name="Password" type="password" /><input id="Password2" name="Password2" type="hidden" value="abc"/>
<dx:ASPxButton ID="btnA"  runat="server" CssClass="btnA" >
</dx:ASPxButton>

And i want to validated Password textbox. It's mean:

- When i click show dialog
- It process validate in dialog
- if i type not the same Password2, it's returned :"Error, please type again".
Thank you!
Posted

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