<%@ Page Language="C#" MasterPageFile="~/masterpage/MasterPage.master" AutoEventWireup="true" CodeFile="AddDistributor.aspx.cs" 
Inherits="AddDistributor" Title="eGen Service" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script src="../JavaScript/scriptvalidation.js" type="text/javascript"></script>
      <script language="javascript" type="text/javascript">
          function deleteSpecialChar(txtName) {
              if (txtName.value != '' && txtName.value.match(/^[\w ]+$/) == null) {
                  txtName.value = txtName.value.replace(/[\W]/g, '');
              }
          }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div id="request">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" id="IdtblAgent" runat="server">
        
        <tr>
            <td colspan="4" style="text-align: center; font-weight:bold">
                Personal Detail
            </td>
        </tr>
        
        <tr>
            <td colspan="4" align="center" style="text-align:center; height:2px">
                <asp:Label ID="lblsucess" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td width="5%">
            </td>
            <td width="25%">
                Authorised Person Name<b>*</b>
            </td>
            <td width="10%">
                :
            </td>
            <td width="60%">
                <asp:DropDownList ID="ddl_Sir_Name" runat="server" Style="width: 60px;" ValidationGroup="test">
                    <asp:ListItem>Select</asp:ListItem>
                    <asp:ListItem>Mr.</asp:ListItem>
                    <asp:ListItem>Ms.</asp:ListItem>
                    <asp:ListItem>Mrs.</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox ID="txt_Auth_Pers_Name" runat="server" Style="width: 168px" ValidationGroup="test" MaxLength="12"
                    onkeypress="return isAlpha(event)"></asp:TextBox>
                    
                <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" runat="server" WatermarkText="Enter First Name" TargetControlID="txt_Auth_Pers_Name">
                </cc1:TextBoxWatermarkExtender>
                
                <asp:RequiredFieldValidator ID="rfv_ddl_Sir_Name" runat="server" ErrorMessage="Please Select Mr./ Ms./Mrs"
                    InitialValue="Select" ValidationGroup="test" ControlToValidate="ddl_Sir_Name"
                    Display="None"></asp:RequiredFieldValidator>
                    
                <asp:RequiredFieldValidator ID="rfv_txt_Auth_Pers_Name" runat="server" ErrorMessage="Please Enter First Name"
                    ValidationGroup="test" ControlToValidate="txt_Auth_Pers_Name" Display="None"></asp:RequiredFieldValidator>
            </td>
        </tr>
        
        <tr>
            <td></td>
            <td></td>
            <td>:</td>
            <td><asp:TextBox ID="txt_Middlename" runat="server" ValidationGroup="test" onkeypress="return isAlpha(event)" Width="111" MaxLength="12"></asp:TextBox>
                <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" WatermarkText="Enter Mid Name" TargetControlID="txt_Middlename">
                </cc1:TextBoxWatermarkExtender>
                <asp:TextBox ID="txt_Lastname" runat="server" ValidationGroup="test" onkeypress="return isAlpha(event)" Width="111" MaxLength="12"></asp:TextBox> 
                <cc1:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server" WatermarkText="Enter Last Name" TargetControlID="txt_Lastname">
                </cc1:TextBoxWatermarkExtender>
                
                <asp:RequiredFieldValidator ID="ReqFVLName" runat="server" ErrorMessage="Please Enter Last Name"
                    ValidationGroup="test" ControlToValidate="txt_Lastname" Display="None"></asp:RequiredFieldValidator>
            </td>
          </tr>
        
        <tr>
            <td></td>
            <td>Company/Firm Name<b>*</b></td>
            <td>:</td>
            <td><asp:TextBox ID="txt_companyfirmname" runat="server" class="style" MaxLength="50" ValidationGroup="test"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv_companyfirmname" runat="server" ValidationGroup="test" ErrorMessage="Please Enter Company/Firm Name" 
                    ControlToValidate="txt_companyfirmname" Display="None"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Date of Birth<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Date_Of_Birth" runat="server" Style="width: 230px;" ValidationGroup="test" oncopy="return false" onpaste="return false" onwrite="return false"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv_txt_Date_Of_Birth" runat="server" ValidationGroup="test"
                    ErrorMessage="Please Enter Date of Birth" ControlToValidate="txt_Date_Of_Birth"
                    Display="None"></asp:RequiredFieldValidator>
                <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txt_Date_Of_Birth" 
                    PopupPosition="Right">
                </cc1:CalendarExtender>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Gender<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddl_Gender_MF" runat="server" Style="width: 117px;" ValidationGroup="test">
                    <asp:ListItem>Select</asp:ListItem>
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfv_ddl_Gender_MF" runat="server" ErrorMessage="Please Enter Gender"
                    InitialValue="Select" Display="None" ControlToValidate="ddl_Gender_MF" ValidationGroup="test"></asp:RequiredFieldValidator>
                <asp:DropDownList ID="ddl_Gender_MU" runat="server" Style="width: 117px;" ValidationGroup="test">
                    <asp:ListItem>Marital Status</asp:ListItem>
                    <asp:ListItem>Married</asp:ListItem>
                    <asp:ListItem>UnMarried</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfv_ddl_Gender_MU" runat="server" ErrorMessage="Please Enter Marital Status"
                    InitialValue="Marital Status" Display="None" ControlToValidate="ddl_Gender_MU"
                    ValidationGroup="test"></asp:RequiredFieldValidator>
            </td>
        </tr>       
        <tr>
            <td colspan="4" style="text-align: center; font-weight:bold">
                  Office Address
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Address1<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Office_Address1" runat="server" class="style" ValidationGroup="test"></asp:TextBox>
                
                <asp:RequiredFieldValidator ID="rfv_txt_Office_Address1" runat="server" ErrorMessage="Please Enter Office Address1"
                    Display="None" ControlToValidate="txt_Office_Address1" ValidationGroup="test"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>Address2</td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Office_Address2" runat="server" class="style" ></asp:TextBox>
                
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Country & State<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                
                <asp:Label ID="lblcountry" runat="server" Text="India" Width="40px"></asp:Label>    
                <asp:DropDownList ID="ddl_State_OA" runat="server" Style="width: 195px;" AutoPostBack="true"
                    OnSelectedIndexChanged="ddl_State_OA_SelectedIndexChanged">
                    <asp:ListItem>Select</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfv_ddl_State_OA" runat="server" ErrorMessage="Please Select State"
                    Display="None" ControlToValidate="ddl_State_OA" ValidationGroup="test" InitialValue="Select"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                District<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddl_Distric_OA" runat="server" Style="width: 232px" ValidationGroup="test">
                    <asp:ListItem>Select</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfv_ddl_Distric_OA" runat="server" ErrorMessage="Please Select Distric"
                    Display="None" ControlToValidate="ddl_State_OA" ValidationGroup="test" InitialValue="Select"></asp:RequiredFieldValidator>
                
            </td>
        </tr>
        
        <tr>
            <td></td>
            <td>City<b>*</b></td>
            <td>:</td>
            <td><asp:TextBox ID="txt_City_OA" runat="server"  ValidationGroup="test" class="style"
                    onkeypress="return isAlpha(event)"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv_txt_City_OA" runat="server" ErrorMessage="Please Enter City"
                    Display="None" ControlToValidate="txt_City_OA" ValidationGroup="test"></asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Pin Code<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Pin_Code_OA" runat="server" class="style" ValidationGroup="test"
                    onkeypress="return digitonly(this,event)" MaxLength="6"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv_txt_Pin_Code_OA" runat="server" ErrorMessage="Please Enter Pin Code"
                    Display="None" ControlToValidate="txt_Pin_Code_OA" ValidationGroup="test"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Nearby Land Mark
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Nearby_Land_Mark_OA" runat="server" class="style" onkeypress="return isAlpha(event)"></asp:TextBox>                
            </td>
        </tr>
     
        <tr>
            <td>
            </td>
            <td>
                Phone & Fax
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Phone_Fax_OA1" runat="server" Style="width: 40px;" 
                    onkeypress="return digitonly(this,event)" MaxLength="5"></asp:TextBox>
                    
                                    
                <asp:TextBox ID="txt_Phone_Fax_OA2" runat="server" Style="width: 88px;" 
                    onkeypress="return digitonly(this,event)" MaxLength="8"></asp:TextBox>
                    
                                   
                <asp:TextBox ID="txt_Phone_Fax_OA3" runat="server" Style="width: 88px;" 
                    onkeypress="return digitonly(this,event)" MaxLength="8"></asp:TextBox>
                    
                
            </td>
        </tr>
        
        
        <tr>
            <td colspan="4" style="text-align: center; font-weight:bold">
                 Primary Details
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                PAN/ S. Tax/ TIN Number<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Pan_Tin_Number" runat="server" class="style" ValidationGroup="test"
                    MaxLength="10" onkeyup="ConvertToCaps(this)"></asp:TextBox>
                    
                <asp:RequiredFieldValidator ID="rfv_txt_Pan_Tin_Number" runat="server" ErrorMessage="Please Enter PAN/ S. Tax/ TIN Number"
                    Display="None" ControlToValidate="txt_Pan_Tin_Number" ValidationGroup="test"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                E-Mail ID<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_EMail_ID" runat="server" class="style" ValidationGroup="test"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv_txt_EMail_ID" runat="server" ErrorMessage="Please Enter E-Mail ID."
                    Display="None" ControlToValidate="txt_EMail_ID" ValidationGroup="test"></asp:RequiredFieldValidator>
                    
                <asp:RegularExpressionValidator ID="reguexp_EmailID" runat="server" ErrorMessage="Please Enter Valid Email Id"
                    ControlToValidate="txt_EMail_ID" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                &nbsp;Alternate E-Mail ID
            </td>
            <td>
                &nbsp;:
            </td>
            <td>
                <asp:TextBox ID="txt_Alternate_Email_ID" runat="server" class="style" ValidationGroup="test"></asp:TextBox>
                    
                <asp:RegularExpressionValidator ID="reguexp_Alter_Email_id" runat="server" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                    ErrorMessage="Please Enter Valid Email ID" ControlToValidate="txt_Alternate_Email_ID"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                Authorized Mobile No.<b>*</b>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txt_Authorized_Mobile_No" onkeyup="javascript:deleteSpecialChar(this)" runat="server" class="style" ValidationGroup="test"
                    onkeypress="return digitonly(this,event)" MaxLength="10"></asp:TextBox>
                <asp:RequiredFieldValidator ID="rfv_txt_Authorized_Mobile_No" runat="server" ErrorMessage="Please Enter Authorized Mobile No."
                    Display="None" ControlToValidate="txt_Authorized_Mobile_No" ValidationGroup="test"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="regMobileNumber" runat="server" Display="None" ControlToValidate="txt_Authorized_Mobile_No"
ErrorMessage="Please enter a  10 digit Authorized Mobile number Starting With(7,8,9)."
ValidationGroup="test" ValidationExpression="^[789][0-9]{9}$">*</asp:RegularExpressionValidator>
            </td>
        </tr>       
       
        <tr>
            <td colspan="4" style="text-align: center; padding: 20px 0 0 0">
                <asp:Button ID="Button1" ValidationGroup="test" runat="server" Text="Submit" class="button" OnClick="Button1_Click" />
                <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="test"
                    ShowMessageBox="true" ShowSummary="false" />
            </td>
        </tr>
        <tr>
            <td colspan="4" style="height: 30px">
            </td>
        </tr>
    </table></div>
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
</asp:Content>

