<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true"
    CodeFile="ChangePassword.aspx.cs" Inherits="ChangePassword" Title="eGen Service" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<script language="javascript" type="text/javascript">
          function deleteSpecialChar(txtName) {
              if (txtName.value != '' && txtName.value.match(/^[\w ]+$/) == null) {
                  txtName.value = txtName.value.replace(/[\W]/g, '');
              }
          }
//          function validate(input, e)//OnClientClick="return validate(this,event)"
//          {
//              alter("HI");
//              if (document.getElementById('txtEmailId').value.indexOf("@") && document.getElementById('txtEmailId').value.indexOf(".") == -1) {
//                  alert("Please Enter a Valid Email-ID");
//                  document.getElementById('txtEmailId').focus();
//                  return false;
//              }
//          }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="middle">
    
    
        <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" runat="server" id="tblChangePwd">
            <tr>
                <td colspan="4" class="hdr">
                    <a href="Profile.aspx">View Profile</a><span style="padding-right: 30px;">&nbsp;</span>
                    <span style="padding-left: 50px;">&nbsp;</span><a href="ChangePassword.aspx" class="active">Change
                        Password</a>
                </td>
            </tr>
            <tr>
                <td style="height: 30px; text-align:center" colspan="4">
                <asp:Label ID="lblMessage" runat="server"></asp:Label>
                </td>
            </tr>
            
            <tr>
                <td width="12%">
                </td>
                <td width="33%">
                    Current Password
                </td>
                <td width="3%">
                    <strong>:</strong>
                </td>
                <td width="52%">
                    <asp:TextBox ID="txt_Curt_Pwd" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:ScriptManager ID="ScriptManager" runat="server">
                    </asp:ScriptManager>
                    <asp:RequiredFieldValidator ID="rfvCurrPassword" runat="server" ControlToValidate="txt_Curt_Pwd" ValidationGroup="test"
                        ErrorMessage="Please Enter Current Password" Display="None">
                    </asp:RequiredFieldValidator>
                    <%--<cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" TargetControlID="rfvCurrPassword"
                        runat="server">
                    </cc1:ValidatorCalloutExtender>--%>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    Set New Password
                </td>
                <td>
                    <strong>:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txt_newpwd" runat="server" onkeyup="javascript:deleteSpecialChar(this)" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvNewPassword" runat="server" ControlToValidate="txt_newpwd" ValidationGroup="test"
                        ErrorMessage="Please Enter Only Alpha Numeric Value New Password" Display="None">
                    </asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revNewPassword" runat="server" ValidationGroup="test"   
                   ErrorMessage="Password length must be between 7 to 10 characters AlphaNumericValue" Display="None" ControlToValidate="txt_newpwd" ValidationExpression="^[a-zA-Z0-9\s]{7,10}$" />

                    <%--<cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" TargetControlID="rfvNewPassword"
                        runat="server">
                    </cc1:ValidatorCalloutExtender>--%>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td>
                    Retype New Password
                </td>
                <td>
                    <strong>:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txt_conf_pwd" runat="server" onkeyup="javascript:deleteSpecialChar(this)"  TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvRetypeNewPassword" runat="server" ValidationGroup="test" ControlToValidate="txt_conf_pwd"
                        ErrorMessage="Please Retype New Password" Display="None">
                    </asp:RequiredFieldValidator>
                    <%--<cc1:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" TargetControlID="rfvRetypeNewPassword"
                        runat="server">
                    </cc1:ValidatorCalloutExtender>--%>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                
           
                </td>
                <td style="padding: 0 0 0 70px;">
                    <asp:Button ID="rbtnSubmit" runat="server" ValidationGroup="test" Text="Submit" class="button" 
                        onclick="rbtnSubmit_Click" />
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="true"
                                            ShowSummary="false" ValidationGroup="test" />
                </td>
            </tr>
            <tr>
                <td colspan="4" style="height: 30px">
                </td>
            </tr>
        </table>
    </div>
    </form>
    <div id="right" style="background: none">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td class="cdr">
                    <strong>Change Password instruction</strong>
                </td>
            </tr>
            <tr>
                <td style="padding: 10px 0 30px 5px; font-size: 15px">
                    Comming Soon
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
