<%@ Page Title="" Language="C#" MasterPageFile="~/Page.Master" AutoEventWireup="true" CodeBehind="Profile.aspx.cs" Inherits="NECPPATEL.Profiel" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style1 {
            width: 36%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript" language="javascript">
        function validatePassword() {
            var x = document.getElementById("<%=txtNewPassword.ClientID%>").value;
            var y = document.getElementById("<%=txtConfirm.ClientID%>").value;
            if (x == "")
            {
                alert('Please enter new password');
                return false;
            }
            if (y == "")
            {
                alert('Please enter confirm password');
                return false;
            }
            if(x!=y)
            {
                alert('New password and Confirm password must be same.');
                return false;
            }
            var reg = /(?=^.{6,}$)(?=.*\d)(?=.*[!@#$%^&*]+)(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/;
            if(!reg.test(x))
            {
                alert('Password must contain minimum requirement.');
                return false;
            }
            return true;
        }
    
</script>
    <table>
        <tr>
            <td colspan="3">If you want to change password Enter new password
                <br />
                and click on Update.</td>
        </tr>
        <tr>
            <td class="auto-style1">Household Name :</td>
            <td colspan="2"><asp:Label ID="lblHouseHoldName" runat="server" Text=""></asp:Label></td>
            
        </tr>
        <tr>
            <td class="auto-style1">Address :</td>
            <td colspan="2"><asp:Label ID="lblAddress" runat="server" Text=""></asp:Label></td>
        </tr>
        <tr>
            <td class="auto-style1">Username :</td>
            <td colspan="2"><asp:Label ID="lblUserName" runat="server" Text=""></asp:Label></td>
            
        </tr>
        <tr>
            <td></td>
            <td style="width:100%" colspan="2">
                <asp:LinkButton ID="lbtnChangePassword" runat="server" OnClick="lbtnChangePassword_Click">Change Password</asp:LinkButton>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:LinkButton ID="lbtnCancel" runat="server" OnClick="lbtnCancel_Click">Cancel</asp:LinkButton>

            </td>
        </tr>
        <tr>
            <td class="auto-style1">New Password :</td>
            <td colspan="2"><asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" Enabled="False"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="auto-style1">Confirm Password :</td>
           <td colspan="2"><asp:TextBox ID="txtConfirm" runat="server" TextMode="Password" Enabled="False"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="auto-style1"></td>
            <td style="width:20% !important">
                <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClientClick="return validatePassword();" OnClick="btnUpdate_Click" /></td>
        <td style="width:50% !important"><asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" /></td>
        </tr>
        <tr>
            <td colspan="3" style="color: #FF0000" >
                </br>Your password must contain all of following criteria.
<ul>
    <li>Length must be greater than or equal to 6</li>
    <li>Contain one or more uppercase characters</li>
    <li>Contain one or more lowercase characters</li>
    <li>Contain one or more numeric values</li>
    <li>Contain one or more special characters [!@#$%^&amp;*]</li>
</ul>
</td>
        </tr>

    </table>
</asp:Content>
