0
<%@Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="EducationInfo.aspx.cs" Inherits="EducationInfo" Title="Qualification"%>
<%@Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1"%>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script language="javascript">
    
    function Delete()
    {
        return confirm("Are You Sure You Want To Delete This Record?");
    }
    
</script>
<aja:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
            <table cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <table cellpadding="0" cellspacing="0">
                              <tr>
                                <td>
                                    <asp:ValidationSummary ID="VSError" runat="server" HeaderText="All * Fields are required" Width="505px" Height="20px" ValidationGroup="Insertion" />
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 201px">
                                    <asp:Panel ID="pnlEmployeeInfo" runat="server" GroupingText="Employee Information">
                                        <table>
                                            <tr>
                                                <td>
                                                                            <asp:Label ID="lbempID" runat="server" Text="Employee ID:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtempID" runat="server" MaxLength="20" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvempID" runat="server" ControlToValidate="txtempID" ErrorMessage="Employee ID is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                                <td>
                                                                            <asp:Label ID="lbattendID" runat="server" Text="Attendance ID:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtattendID" runat="server" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvAttendID" runat="server" ControlToValidate="txtattendID" ErrorMessage="Attendance ID is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                                <td>
                                                                            <asp:Label ID="lbApplicant" runat="server" Text="Applicant:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:DropDownList ID="ddlapplicant" runat="server" ValidationGroup="Insertion" Enabled="False">
                                                                                <asp:ListItem Selected="True">Yes</asp:ListItem>
                                                                                <asp:ListItem>No</asp:ListItem>                                                                            
                                                                            </asp:DropDownList></td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                                            <asp:Label ID="lbTitle" runat="server" Text="Title:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:DropDownList ID="ddlTitle" runat="server" ValidationGroup="Insertion" Enabled="False">
                                                                                <asp:ListItem Selected="True">Mr.</asp:ListItem>
                                                                                <asp:ListItem>Mrs.</asp:ListItem>
                                                                                <asp:ListItem>Miss</asp:ListItem>
                                                                                <asp:ListItem>Madam</asp:ListItem>
                                                                                <asp:ListItem>Sir</asp:ListItem>
                                                                            </asp:DropDownList></td>
                                                <td>
                                                </td>
                                                <td>
                                                                            <asp:Label ID="lbFname" runat="server" Text="First Name:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtfname" runat="server" MaxLength="20" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtfname" ErrorMessage="First Name is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                                <td>
                                                                            <asp:Label ID="lbLastName" runat="server" Text="Last Name:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtLastName" runat="server" MaxLength="20" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvLastName" runat="server" ControlToValidate="txtLastName" ErrorMessage="Last Name is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                                            <asp:Label ID="lbNic" runat="server" Text="NIC:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtNIC" runat="server" MaxLength="25" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvNIC" runat="server" ControlToValidate="txtNIC" ErrorMessage="NIC is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                                <td>
                                                                            <asp:Label ID="lbSSN" runat="server" Text="SSN:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtSSN" runat="server" MaxLength="25" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvSSN" runat="server" ControlToValidate="txtSSN" ErrorMessage="SSN is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                                <td>
                                                                            <asp:Label ID="lbStatus" runat="server" Text="Status:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:DropDownList ID="ddlStatus" runat="server" ValidationGroup="Insertion" Enabled="False">
                                                                                <asp:ListItem Selected="True">Active</asp:ListItem>
                                                                                <asp:ListItem>InActive</asp:ListItem>                                                                            
                                                                            </asp:DropDownList></td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                                            <asp:Label ID="lbCurrentAdd" runat="server" Text="Current Address:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtCurrentAdd" runat="server" MaxLength="100" Columns="10" Rows="3" TextMode="MultiLine" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvCurrentAdd" runat="server" ControlToValidate="txtCurrentAdd" ErrorMessage="Current Address is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                                <td>
                                                                            <asp:Label ID="lbCellPhone" runat="server" Text="Cell Phone:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtCellPhone" runat="server" MaxLength="15" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                </td>
                                                <td>
                                                                            <asp:Label ID="lbDepartment" runat="server" Text="Department:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtDepartment" runat="server" MaxLength="4" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvDepartment" runat="server" ControlToValidate="txtDepartment" ErrorMessage="Department is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                                            <asp:Label ID="lbLocation" runat="server" Text="Location:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:DropDownList ID="ddlLocation" runat="server" ValidationGroup="Insertion" Enabled="False">                                                           
                                                                            </asp:DropDownList></td>
                                                <td>
                                                </td>
                                                <td>
                                                                            <asp:Label ID="lbPostCode" runat="server" Text="Postal Code:" Width="80px">
                                                                            </asp:Label></td>
                                                <td>
                                                                            <asp:TextBox ID="txtPostCode" runat="server" MaxLength="10" ValidationGroup="Insertion" Enabled="False"></asp:TextBox></td>
                                                <td>
                                                                            <asp:RequiredFieldValidator ID="rfvPostalCode" runat="server" ControlToValidate="txtPostCode" ErrorMessage="Postal Code is required" ValidationGroup="Insertion" SetFocusOnError="True">*
                                                                            </asp:RequiredFieldValidator></td>
                                                <td>
                                                                <asp:ImageButton ID="imgbtnSearchContact" runat="server" AlternateText="Search" ImageUrl="~/buttons/buttons_03.gif" OnClick="imgbtnSearch_Click"/></td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel> 
                                </td>   
                            </tr>
                            <tr>
                                <td>
                               <cc1:TabContainer ID="tcEmployee" runat="server" ActiveTabIndex="0">
                                <cc1:TabPanel ID="tpPersonal" runat="server">
                                <HeaderTemplate>
                                Education
                                 </HeaderTemplate>
                                  <ContentTemplate>
                                   <asp:Panel ID="pnlEducation" runat="server" GroupingText="Education">
                                       <table>
                                           <tr>
                                               <td>
                                                            <asp:Label ID="degree" runat="server" Text="Degree Level:" Width="80px"></asp:Label></td>
                                               <td>
                                                        <asp:DropDownList ID="edudegree" runat="server">
                                                                <asp:ListItem>Select Degree Level</asp:ListItem>
                                                                <asp:ListItem>Masters</asp:ListItem>
                                                                <asp:ListItem>MBA</asp:ListItem>
                                                                <asp:ListItem>Bachlor Degree</asp:ListItem>
                                                                <asp:ListItem>B.Com/Bsc/BE</asp:ListItem>
                                                                <asp:ListItem>Intermidiate</asp:ListItem>
                                                                <asp:ListItem>Matric</asp:ListItem>
                                                                <asp:ListItem>Diploma</asp:ListItem>
                                                                <asp:ListItem>Other</asp:ListItem>
                                                            </asp:DropDownList></td>
                                               <td>
                                                            <asp:RequiredFieldValidator ID="rfvedudegree" runat="server" ControlToValidate="edudegree" ValidationGroup="Insertion" SetFocusOnError="True" InitialValue="Select Degree Level" ErrorMessage="Degree level Required.">*
                                                            </asp:RequiredFieldValidator></td>
                                               <td>
                                                            <asp:Label ID="degreetitle" runat="server" Text="Degtee Title:" Width="65px"></asp:Label></td>
                                               <td>
                                                            <asp:TextBox ID="title" runat="server" MaxLength="25" ValidationGroup="Insertion"></asp:TextBox></td>
                                               <td>
                                                            <asp:RequiredFieldValidator ID="rfvedutitleName" runat="server" ControlToValidate="title" ValidationGroup="Insertion" SetFocusOnError="True" ErrorMessage="Degree Title Required.">*
                                                            </asp:RequiredFieldValidator></td>
                                               <td>
                                                            <asp:Label ID="gpa" runat="server" Text="GPA:" Width="50px"></asp:Label></td>
                                               <td>
                                                            <asp:TextBox ID="cgpa" runat="server" MaxLength="4"></asp:TextBox></td>
                                               <td>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                            <asp:Label ID="major" runat="server" Text="Major Subjects:" Width="80px"></asp:Label></td>
                                               <td>
                                                            <asp:TextBox ID="majorsub" runat="server" MaxLength="25" ValidationGroup="Insertion"></asp:TextBox></td>
                                               <td>
                                                            <asp:RequiredFieldValidator ID="rfvmajor" runat="server" ControlToValidate="majorsub" ValidationGroup="Insertion" SetFocusOnError="True" ErrorMessage="Major Subjects Required.">*
                                                            </asp:RequiredFieldValidator></td>
                                               <td>
                                                            <asp:Label ID="lbgranPhysicalAddress" runat="server" Text="Start Date" Width="65px"></asp:Label></td>
                                               <td>
                                                            <asp:TextBox ID="start" runat="server" Width="120px"></asp:TextBox><asp:Image ID="cal" runat="server" ImageUrl="~/images/calander2.gif" Width="20px" /></td>
                                               <td>
                                                            <asp:RequiredFieldValidator ID="rfvsdate" runat="server" ControlToValidate="start" ValidationGroup="Insertion" SetFocusOnError="True" ErrorMessage="Date is Required.">*
                                                            </asp:RequiredFieldValidator><cc1:MaskedEditValidator ID="mevstart" runat="server" ControlExtender="meestart" ControlToValidate="start" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" Display="Dynamic" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="Insertion" ErrorMessage="mevstart" /><cc1:MaskedEditExtender ID="meestart" runat="server" TargetControlID="start" Mask="99/99/9999" OnFocusCssClass="DateFocus" OnInvalidCssClass="DateInvalid" MaskType="Date" ErrorTooltipEnabled="True" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" /> </td>
                                               <td>
                                                            <asp:Label ID="enddate" runat="server" Text="End Date:" Width="50px"></asp:Label></td>
                                               <td>
                                                            <asp:TextBox ID="end" runat="server" Width="120px"></asp:TextBox><asp:Image ID="endc" runat="server" ImageUrl="~/images/calander2.gif" Width="20px" /></td>
                                               <td>
                                                            <asp:RequiredFieldValidator ID="rfvedate" runat="server" ControlToValidate="end" ValidationGroup="Insertion" SetFocusOnError="True" ErrorMessage="Date is Required.">*
                                                            </asp:RequiredFieldValidator><cc1:MaskedEditValidator ID="mevend" runat="server" ControlExtender="meeend" ControlToValidate="end" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" Display="Dynamic" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="Insertion" ErrorMessage="mevend" /><cc1:MaskedEditExtender ID="meeend" runat="server" TargetControlID="end" Mask="99/99/9999" OnFocusCssClass="DateFocus" OnInvalidCssClass="DateInvalid" MaskType="Date" ErrorTooltipEnabled="True" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" /> </td>
                                           </tr>
                                           <tr>
                                               <td>
                                                            <asp:Label ID="uni" runat="server" Text="University/Board:" Width="80px"></asp:Label></td>
                                               <td>
                                                            <asp:TextBox ID="eduni" runat="server" MaxLength="11" ValidationGroup="Insertion"></asp:TextBox></td>
                                               <td>
                                                            <asp:RequiredFieldValidator ID="rfveduni" runat="server" ControlToValidate="eduni" ValidationGroup="Insertion" SetFocusOnError="True" ErrorMessage="Uni/board Required.">*
                                                            </asp:RequiredFieldValidator></td>
                                               <td>
                                                            <asp:Label ID="grade" runat="server" Text="Grade:" Width="65px"></asp:Label></td>
                                               <td>
                                                            <asp:TextBox ID="edugrade" runat="server" MaxLength="1" ValidationGroup="Insertion"></asp:TextBox></td>
                                               <td>
                                                            <asp:RequiredFieldValidator ID="rfvedugrade" runat="server" ControlToValidate="edugrade" ValidationGroup="Insertion" SetFocusOnError="True" ErrorMessage="Grade is Required.">*
                                                            </asp:RequiredFieldValidator></td>
                                               <td>
                                               </td>
                                               <td>
                                               </td>
                                               <td>
                                               </td>
                                           </tr>
                                           <tr>
                                               <td colspan="9">
                                                   <asp:Label ID="Label7" runat="server" Text="Upload Degree:"></asp:Label>
                                                   <asp:FileUpload ID="fuUploadDgee" runat="server" Width="408px" />
                                                   <asp:LinkButton ID="Download" runat="server" OnClick="Download_Click">Download</asp:LinkButton></td>
                                           </tr>
                                           <tr>
                                               <td colspan="9">
                                                    <asp:ImageButton ID="btnAddEduRecord" runat="server" AlternateText="Add Record" ImageUrl="~/buttons/buttons_58.gif" ValidationGroup="Insertion" OnClick="btnAddRecord_Click"/>
                                                   <asp:ImageButton ID="btnUpdateRecord" runat="server" AlternateText="Update Record" Enabled="False" ImageUrl="~/buttons/buttons-2_01.gif" ValidationGroup="Insertion" OnClick="btnUpdateRecord_Click"/>
                                                   <asp:ImageButton ID="btnDeleteRecord" runat="server" AlternateText="Delete Record" Enabled="False" OnClientClick="return confirm('Are You Sure You Want To Delete This Record?');" ImageUrl="~/buttons/buttons_23.gif" ValidationGroup="Insertion" OnClick="btnDeleteRecord_Click"/></td>
                                           </tr>
                                           <tr>
                                               <td colspan="9">
                                            <asp:GridView ID="gvEducationrData" runat="server" PageSize="5" AllowPaging="True" CssClass="text10" CaptionAlign="Top" AutoGenerateSelectButton="True" AutoGenerateColumns="False" OnPageIndexChanging="gvSearchEducation_PageIndexChanging" DataKeyNames="edu_id" OnSelectedIndexChanged="gvEducationrData_SelectedIndexChanged" AllowSorting="True">
                                            <Columns>
                                                    <asp:TemplateField HeaderText="Degree Name">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvName" runat="server" Text='<%# Eval("edu_distinction") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="Degree Title">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvName" runat="server" Text='<%# Eval("edu_degree") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="GPA">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvType" runat="server" Text='<%# Eval("edu_gpa") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="Subjects">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvfName" runat="server" Text='<%# Eval("edu_major") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="Start Date">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvNic" runat="server" Text='<%# Eval("edu_startdate") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="End Date">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvDesignation" runat="server" Text='<%# Eval("edu_enddate") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="University Name">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvCell" runat="server" Text='<%# Eval("edu_uni") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="Grade">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvAddress" runat="server" Text='<%# Eval("edu_grade") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                </Columns>
                                                <FooterStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White"></FooterStyle>
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333"></RowStyle>
                                                <EditRowStyle BackColor="#999999"></EditRowStyle>
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333"></SelectedRowStyle>
                                                <PagerStyle HorizontalAlign="Center" BackColor="#348EC2" ForeColor="White"></PagerStyle>
                                                <HeaderStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White"></HeaderStyle>
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775"></AlternatingRowStyle>
                                            </asp:GridView>
                                               </td>
                                           </tr>
                                       </table>
                                    </asp:Panel> 
                                   <cc1:CalendarExtender ID="CalendarExtender2" runat="server" PopupButtonID="endc" TargetControlID="end" Enabled="True">
                                   </cc1:CalendarExtender>
                                    <cc1:CalendarExtender ID="CalendarExtender1" runat="server" PopupButtonID="cal" TargetControlID="start" Enabled="True">
                                    </cc1:CalendarExtender>                                    
                                    <cc1:FilteredTextBoxExtender ID="ftetitle" runat="server" TargetControlID="title" FilterType="Custom, UppercaseLetters, LowercaseLetters" ValidChars="A, ," Enabled="True">
                                    </cc1:FilteredTextBoxExtender><asp:HiddenField ID="HEducationID" runat="server" /><asp:HiddenField ID="HEduID" runat="server" /><asp:HiddenField ID="HEducationDegreeID" runat="server" />
                                    <cc1:FilteredTextBoxExtender ID="ftecgpa" runat="server" TargetControlID="cgpa" FilterType="Custom, Numbers" ValidChars="." Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <cc1:FilteredTextBoxExtender ID="ftemajorsub" runat="server" TargetControlID="majorsub" FilterType="Custom, UppercaseLetters, LowercaseLetters" ValidChars="A, ," Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <cc1:FilteredTextBoxExtender ID="fteeduni" runat="server" TargetControlID="eduni" FilterType="Custom, UppercaseLetters, LowercaseLetters" ValidChars="A," Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <cc1:FilteredTextBoxExtender ID="fteedugrade" runat="server" TargetControlID="edugrade" FilterType="Custom, UppercaseLetters, LowercaseLetters" ValidChars="A, ," Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <asp:HiddenField ID="HContactID" runat="server" />
                                   </ContentTemplate>
                                 </cc1:TabPanel>
                                 <cc1:TabPanel ID="TabSkills" runat="server">
                                <HeaderTemplate>
                                Skills
                                 </HeaderTemplate>
                                 <ContentTemplate>
                                    <asp:Panel ID="pnlSkillsr" runat="server" GroupingText="Skills">
                                        <table>
                                            <tr>
                                                <td>
                                                            <asp:Label ID="lbgranName" runat="server" Text="Skill Type:" Width="69px"></asp:Label></td>
                                                <td>
                                                    <asp:DropDownList ID="Ddlskltype" runat="server" ValidationGroup="Insertion1">
                                                                <asp:ListItem>Select</asp:ListItem>
                                                                <asp:ListItem>International Marketing</asp:ListItem>
                                                                <asp:ListItem>Organizational's Skills</asp:ListItem>
                                                                <asp:ListItem>Team Management</asp:ListItem>
                                                                <asp:ListItem>Programmer</asp:ListItem>
                                                                <asp:ListItem>Others</asp:ListItem>
                                                            </asp:DropDownList></td>
                                                <td>
                                                          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="Ddlskltype" ErrorMessage="Skill type is required." ValidationGroup="Insertion1" SetFocusOnError="True" InitialValue="Select">*
                                                           </asp:RequiredFieldValidator></td>
                                                <td>
                                                            <asp:Label ID="skillname" runat="server" Text="Skill Name:" Width="80px"></asp:Label></td>
                                                <td>
                                                            <asp:TextBox ID="txtskillname" runat="server" MaxLength="25" ValidationGroup="Insertion1"></asp:TextBox></td>
                                                <td>
                                                          <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtskillname" ErrorMessage="Skill Name is required." ValidationGroup="Insertion1" SetFocusOnError="True">*
                                                           </asp:RequiredFieldValidator></td>
                                                <td>
                                                            <asp:Label ID="skillexp" runat="server" Text="Skill Experiance:" Width="80px"></asp:Label></td>
                                                <td>
                                                            <asp:TextBox ID="txtsklexp" runat="server" ValidationGroup="Insertion1"></asp:TextBox></td>
                                                <td>
                                                          <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtsklexp" ErrorMessage="Experience is required" ValidationGroup="Insertion1" SetFocusOnError="True">*
                                                           </asp:RequiredFieldValidator></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                            <asp:Label ID="Comments" runat="server" Text="Comments:" Width="67px"></asp:Label></td>
                                                <td>
                                                            <asp:TextBox ID="txtsklcmt" runat="server" MaxLength="25" Columns="10" Rows="3" TextMode="MultiLine" ValidationGroup="Insertion1"></asp:TextBox></td>
                                                <td>
                                                          <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtsklcmt" ErrorMessage="Comments are required." ValidationGroup="Insertion1" SetFocusOnError="True">*
                                                           </asp:RequiredFieldValidator></td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="9">
                                                    <asp:ImageButton ID="AddSkill" runat="server" AlternateText="Add Record" ImageUrl="~/buttons/buttons_58.gif" OnClick="AddSkill_Click" ValidationGroup="Insertion1"/>
                                                    <asp:ImageButton ID="UpdateSkill" runat="server" AlternateText="Update Record" Enabled="False" ImageUrl="~/buttons/buttons-2_01.gif" OnClick="UpdateSkill_Click" ValidationGroup="Insertion1"/>
                                                            <asp:ImageButton ID="DeleteSkill" runat="server" AlternateText="Delete Record" Enabled="False" OnClientClick="return confirm('Are You Sure You Want To Delete This Record?');" ImageUrl="~/buttons/buttons_23.gif" OnClick="DeleteSkill_Click"/><asp:HiddenField ID="HSkill" runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="9">
                                            <asp:GridView ID="gvSkill" runat="server" PageSize="5" AllowPaging="True" CssClass="text10" CaptionAlign="Top" DataKeyNames="skill_id" AutoGenerateSelectButton="True" AutoGenerateColumns="False"
                                                            Width="750px" OnPageIndexChanging="gvSearchSkill_PageIndexChanging" OnSelectedIndexChanged="gvSkillData_SelectedIndexChanged">
                                                <Columns>
                                                    <asp:TemplateField HeaderText="Type">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvName" runat="server" Text='<%# Eval("skill_type") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="Name">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvType" runat="server" Text='<%# Eval("skill_name") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="Experiance">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvfName" runat="server" Text='<%# Eval("skill_exp") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                    <asp:TemplateField HeaderText="Comments">  
                                                        <ItemTemplate>  
                                                            <asp:Label ID="lbgvNic" runat="server" Text='<%# Eval("skill_comments") %>'></asp:Label>                                                              
                                                        </ItemTemplate>  
                                                    </asp:TemplateField> 
                                                </Columns>
                                                <FooterStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White"></FooterStyle>
                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333"></RowStyle>
                                                <EditRowStyle BackColor="#999999"></EditRowStyle>
                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333"></SelectedRowStyle>
                                                <PagerStyle HorizontalAlign="Center" BackColor="#348EC2" ForeColor="White"></PagerStyle>
                                                <HeaderStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White"></HeaderStyle>
                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775"></AlternatingRowStyle>
                
                                            </asp:GridView>
                                                </td>
                                            </tr>
                                        </table>
                                    <cc1:FilteredTextBoxExtender ID="Filteredtxtsklexp" runat="server" TargetControlID="txtsklexp" FilterType="Numbers" Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                 <cc1:FilteredTextBoxExtender ID="Filteredtxtskillname" runat="server" TargetControlID="txtskillname" FilterType="Custom, UppercaseLetters, LowercaseLetters" ValidChars="A, ," Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    </asp:Panel>
                                 </ContentTemplate>
                                 </cc1:TabPanel>
                            <cc1:TabPanel ID="TabPanel1" runat="server">
                              <HeaderTemplate>
                                Work Experience
                              </HeaderTemplate>
                                <ContentTemplate>
                                    <asp:Panel GroupingText="Work Experiance" ID="Panel1" runat="server">
                                        <table>
                                            <tr>
                                                <td>
                                              <asp:Label ID="lbexpcomp" runat="server" Text="Company Name:" Width="80px"></asp:Label></td>
                                                <td>
                                                 <asp:TextBox ID="txtcompnme" runat="server" MaxLength="25" ValidationGroup="Insertion2"></asp:TextBox></td>
                                                <td>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtcompnme" ErrorMessage="Company Name is required." ValidationGroup="Insertion2" SetFocusOnError="True">*
                                                </asp:RequiredFieldValidator></td>
                                                <td>
                                              <asp:Label ID="jobtlt" runat="server" Text="Job Title:" Width="80px"></asp:Label></td>
                                                <td>
                                              <asp:TextBox ID="txtjobtit" runat="server" MaxLength="25" ValidationGroup="Insertion2"></asp:TextBox></td>
                                                <td>
                                               <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtjobtit" ErrorMessage="Job Title  is required." ValidationGroup="Insertion2" SetFocusOnError="True">*
                                               </asp:RequiredFieldValidator></td>
                                                <td>
                                               <asp:Label ID="Label1" runat="server" Text="Start Date:" Width="80px"></asp:Label></td>
                                                <td>
                                               <asp:TextBox ID="txtfromdate" runat="server" ValidationGroup="Insertion2" Width="120px"></asp:TextBox><asp:ImageButton
                                                 ID="imgbtnstdt" runat="server" Height="22px" ImageUrl="~/images/calander2.gif"
                                                 Width="18px" /></td>
                                                <td>
                                               <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtfromdate" ErrorMessage="Work  is required" ValidationGroup="Insertion2" SetFocusOnError="True">*
                                               </asp:RequiredFieldValidator><cc1:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtfromdate" Mask="99/99/9999" OnFocusCssClass="DateFocus" OnInvalidCssClass="DateInvalid" MaskType="Date" ErrorTooltipEnabled="True" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" /> 
                                               <cc1:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1" ControlToValidate="txtfromdate" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" Display="Dynamic" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="Insertion2" ErrorMessage="mevstart" /></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                 <asp:Label ID="Label2" runat="server" Text="End Date:" Width="80px"></asp:Label></td>
                                                <td>
                                                 <asp:TextBox ID="txtenddt" runat="server" ValidationGroup="Insertion2" Width="120px"></asp:TextBox><asp:ImageButton
                                                                ID="ImageBtnenddt" runat="server" Height="22px" ImageUrl="~/images/calander2.gif"
                                                                Width="18px" /></td>
                                                <td>
                                                    <cc1:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtenddt" Mask="99/99/9999" OnFocusCssClass="DateFocus" OnInvalidCssClass="DateInvalid" MaskType="Date" ErrorTooltipEnabled="True" CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder="" CultureTimePlaceholder="" Enabled="True" /> 
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtenddt" ErrorMessage="Date  is required." ValidationGroup="Insertion2" SetFocusOnError="True">*
                                                </asp:RequiredFieldValidator><cc1:MaskedEditValidator ID="MaskedEditValidator2" runat="server" ControlExtender="MaskedEditExtender2" ControlToValidate="txtenddt" EmptyValueMessage="Date is required" InvalidValueMessage="Date is invalid" Display="Dynamic" EmptyValueBlurredText="*" InvalidValueBlurredMessage="*" ValidationGroup="Insertion" ErrorMessage="mevend" /></td>
                                                <td>
                                                 <asp:Label ID="txtexpsal" runat="server" Text="Salary:" Width="80px"></asp:Label></td>
                                                <td>
                                                <asp:TextBox ID="txtsal" runat="server" ValidationGroup="Insertion2"></asp:TextBox></td>
                                                <td>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txtsal" ErrorMessage="Salary  is required." ValidationGroup="Insertion2" SetFocusOnError="True" Width="6px">*
                                                </asp:RequiredFieldValidator></td>
                                                <td>
                                                 <asp:Label ID="Label4" runat="server" Text="Employeer Web:" Width="80px"></asp:Label></td>
                                                <td>
                                                 <asp:TextBox ID="txtempweb" runat="server" MaxLength="35" ValidationGroup="Insertion2"></asp:TextBox></td>
                                                <td>
                                               <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtempweb" ErrorMessage="Employee web is required" ValidationGroup="Insertion2" SetFocusOnError="True">*
                                               </asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="valtxtempweb" runat="server" ControlToValidate="txtempweb" ErrorMessage="Invalid web address." SetFocusOnError="True" ToolTip="Invalid URL address" ValidationExpression="([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?" ValidationGroup="Insertion2">*</asp:RegularExpressionValidator></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                <asp:Label ID="Label3" runat="server" Text="Comments:" Width="80px"></asp:Label></td>
                                                <td>
                                                <asp:TextBox ID="txtwrkcmt" runat="server" Columns="10" MaxLength="25" Rows="3" TextMode="MultiLine" ValidationGroup="Insertion2"></asp:TextBox></td>
                                                <td>
                                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtwrkcmt" ErrorMessage="Comments are required." ValidationGroup="Insertion2" SetFocusOnError="True">*
                                                  </asp:RequiredFieldValidator></td>
                                                <td>
                                               <asp:Label ID="Label5" runat="server" Text="Reason:" Width="80px"></asp:Label></td>
                                                <td>
                                                <asp:TextBox ID="txtreason" runat="server" Columns="10" MaxLength="25" Rows="3" TextMode="MultiLine" ValidationGroup="Insertion2"></asp:TextBox></td>
                                                <td>
                                               <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="txtreason" ErrorMessage="Reason  is required." ValidationGroup="Insertion2" SetFocusOnError="True">*
                                               </asp:RequiredFieldValidator></td>
                                                <td>
                                                <asp:Label ID="Label6" runat="server" Text="Duration:" Width="80px"></asp:Label></td>
                                                <td>
                                               <asp:TextBox ID="txtserperiod" runat="server" ValidationGroup="Insertion2" MaxLength="2"></asp:TextBox></td>
                                                <td>
                                               <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="txtserperiod" ErrorMessage="Duration  is required." ValidationGroup="Insertion2" SetFocusOnError="True">*
                                               </asp:RequiredFieldValidator></td>
                                            </tr>
                                            <tr>
                                                <td colspan="9">
                                                 <asp:ImageButton ID="AddWork" runat="server" AlternateText="Add Record" ImageUrl="~/buttons/buttons_58.gif" ValidationGroup="Insertion2" OnClick="AddWork_Click" />
                                                 <asp:ImageButton ID="UpdateWork" runat="server" AlternateText="Update Record" Enabled="False" ImageUrl="~/buttons/buttons-2_01.gif" ValidationGroup="Insertion2" OnClick="UpdateWork_Click" />
                                                 <asp:ImageButton ID="DeleteWork" runat="server" AlternateText="Delete Record" Enabled="False" OnClientClick="return confirm('Are You Sure You Want To Delete This Record?');" ImageUrl="~/buttons/buttons_23.gif" OnClick="DeleteWork_Click" /><asp:GridView ID="gvworkexp" runat="server" PageSize="5" AllowPaging="True" CssClass="text10" CaptionAlign="Top" DataKeyNames="exp_id" AutoGenerateSelectButton="True" AutoGenerateColumns="False" OnPageIndexChanging="gvSearchWork_PageIndexChanging" OnSelectedIndexChanged="gvWorkData_SelectedIndexChanged" Width="750px">
                                                                <FooterStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White" />
                                                                <Columns>
                                                                    <asp:TemplateField HeaderText="Company Name">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvName" runat="server" Text='<%# Eval("exp_employer") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Job Tittle">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvType" runat="server" Text='<%# Eval("exp_jobtitle") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Start Date">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvfName" runat="server" Text='<%# Eval("exp_fromdate") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="End Date">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvNic" runat="server" Text='<%# Eval("exp_todate") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Comments">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvDesignation" runat="server" Text='<%# Eval("exp_comment") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Last Salary">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvCell" runat="server" Text='<%# Eval("exp_salary") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                    <asp:TemplateField HeaderText="Reason">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvAddress" runat="server" Text='<%# Eval("exp_reason") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                     <asp:TemplateField HeaderText="SerPeriod">
                                                                        <ItemTemplate>
                                                                            <asp:Label ID="lbgvAddress" runat="server" Text='<%# Eval("exp_serperiod") %>'></asp:Label>
                                                                        </ItemTemplate>
                                                                    </asp:TemplateField>
                                                                </Columns>
                                                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                                                <EditRowStyle BackColor="#999999" />
                                                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                                                <PagerStyle BackColor="#348EC2" ForeColor="White" HorizontalAlign="Center" />
                                                                <HeaderStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White" />
                                                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                                            </asp:GridView>
                                                </td>
                                            </tr>
                                        </table>
                                     <cc1:CalendarExtender ID="CalendarExtender3" runat="server" PopupButtonID="imgbtnstdt" TargetControlID="txtfromdate" Enabled="True">
                                     </cc1:CalendarExtender>
                                     <cc1:CalendarExtender ID="CalendarExtender4" runat="server" PopupButtonID="ImageBtnenddt" TargetControlID="txtenddt" Enabled="True">
                                     </cc1:CalendarExtender>
                                    <cc1:FilteredTextBoxExtender ID="Filtxtcompnme" runat="server" TargetControlID="txtcompnme" FilterType="Custom, UppercaseLetters, LowercaseLetters" ValidChars="A, ," Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <cc1:FilteredTextBoxExtender ID="Filtxtserperiod" runat="server" TargetControlID="txtserperiod" FilterType="Numbers" Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <cc1:FilteredTextBoxExtender ID="Filtxtjobtit" runat="server" TargetControlID="txtjobtit" FilterType="Custom, UppercaseLetters, LowercaseLetters" ValidChars="A, ," Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <cc1:FilteredTextBoxExtender ID="Filtxtempweb" runat="server" TargetControlID="txtempweb" FilterType="Custom, Numbers, UppercaseLetters, LowercaseLetters" ValidChars="A,." Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <cc1:FilteredTextBoxExtender ID="Filtxtsal" runat="server" TargetControlID="txtsal" FilterType="Numbers" Enabled="True">
                                    </cc1:FilteredTextBoxExtender>
                                    <asp:HiddenField ID="HdExp" runat="server" />
                                 </asp:Panel>
                                 </ContentTemplate>
                                 </cc1:TabPanel>
                                 </cc1:TabContainer>
                                </td>  
                            </tr>
                            <tr>
                                <td align="center">
                                    <asp:Panel ID="pnlSearchMain" runat="server" Style="display: none;">
                                                    <asp:Panel ID="pnlSearchHeader" runat="server">
                                                        <table width="400" border="0" align="center" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td align="left" background="images/pop-up_02.png" style="text-align: center">
                                                                    <asp:Label ID="lbSearchHeader" runat="server" Text="Label" CssClass="left_titles" Width="200px">Search Contact</asp:Label>
                                                                </td>
                                                                <td align="right" background="images/pop-up_02.png">
                                                                    <asp:ImageButton ID="ibtnCancelSearchContact" runat="server" ImageUrl="images/cancel.png" ImageAlign="Top">
                                                                    </asp:ImageButton>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td bgcolor="#f1f1f1" colspan="2">
                                                                    <!-- Content Starts -->
                                                                    <table bgcolor="#f1f1f1" style="width: 308px">
                                                                        <tr>
                                                                            <td colspan="2">
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="center" colspan="2">
                                                                                <asp:Label ID="lbSearchFName" runat="server" Text="First Name:" Width="60px"></asp:Label><%--</td>--%>
                                                                            <%--<td align="left">--%>
                                                                                <asp:TextBox ID="txtSearchFName" runat="server"></asp:TextBox></td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="center" colspan="2">
                                                                                <asp:Label ID="lbSearchCNIC" runat="server" Text="CNIC:" Width="60px"></asp:Label><%--</td>--%>
                                                                            <%--<td align="left">--%>
                                                                                <asp:TextBox ID="txtSearchCNIC" runat="server" MaxLength="15"></asp:TextBox></td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                            </td>
                                                                            <td align="center">
                                                                                <asp:ImageButton ID="ImageButton1" AlternateText="Search" runat="server" ImageUrl="~/buttons/buttons_03.gif" OnClick="imgbtnSearch_Click"/></td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                            </td>
                                                                            <td align="center">
                                                                                <asp:Label ID="lbEmptyRecordContact" runat="server"></asp:Label></td>
                                                                        </tr>
                                                                    
                                                                <tr>
                                                                    <td align="center" colspan="2">
                                                                        <%--<aja:UpdatePanel>
                                                                            <ContentTemplate>--%>
                                                                                 <asp:GridView ID="gvSearchContact" runat="server" PageSize="5" AllowPaging="true" AutoGenerateSelectButton="true"
                                                                            CssClass="text10" CaptionAlign="Top" DataKeyNames="EmployeeNo" Width="850px" OnPageIndexChanging="gvSearchContact_PageIndexChanging" OnSelectedIndexChanged="gvSearchToken_SelectedIndexChanged">                                                                            
                                                                            <FooterStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White"></FooterStyle>
                                                                            <RowStyle BackColor="#F7F6F3" ForeColor="#333333"></RowStyle>
                                                                            <EditRowStyle BackColor="#999999"></EditRowStyle>
                                                                            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333"></SelectedRowStyle>
                                                                            <PagerStyle HorizontalAlign="Center" BackColor="#348EC2" ForeColor="White"></PagerStyle>
                                                                            <HeaderStyle BackColor="#348EC2" Font-Bold="True" ForeColor="White"></HeaderStyle>
                                                                            <AlternatingRowStyle BackColor="White" ForeColor="#284775"></AlternatingRowStyle>
                                                                        </asp:GridView>
                                                                        <cc1:FilteredTextBoxExtender ID="FTENIC4Popup" runat="server" TargetControlID="txtSearchCNIC"
                                                                            FilterType="Numbers,LowercaseLetters,UppercaseLetters,Custom" ValidChars="- / \ # _ *">
                                                                        </cc1:FilteredTextBoxExtender>
                                                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="txtSearchFName"
                                                                            ValidChars="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z">
                                                                    </cc1:FilteredTextBoxExtender>
                                                                           <%-- </ContentTemplate>
                                                                        </aja:UpdatePanel>--%>
                                                                       
                                                                        <asp:ImageButton ID="btnOK" runat="server" ImageUrl="~/buttons/buttons_11.gif" OnClick="btnOK_Click"/></td>
                                                                </tr>
                                                            </table>
                                                             <%--Content Ends --%>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </asp:Panel>
                                            </asp:Panel>
                                            <cc1:ModalPopupExtender ID="mpeSearchContact" runat="server" BackgroundCssClass="modalbackground" PopupControlID="pnlSearchMain" PopupDragHandleControlID="pnlSearchHeader" TargetControlID="imgbtnSearchContact" CancelControlID="ibtnCancelSearchContact">
                                            </cc1:ModalPopupExtender>
                                </td>
                            </tr>                             
                        </table>
                    </td>
                </tr>
            </table>
              </td>   
              </tr>
              <tr>
              <td>
              <br />
              </ContentTemplate> 
         <Triggers>
            <aja:PostBackTrigger ControlID="btnAddEduRecord" />
            <aja:PostBackTrigger ControlID="btnUpdateRecord" />
            <aja:PostBackTrigger ControlID="Download"/>
        </Triggers>
    </aja:UpdatePanel>
</asp:Content>

code aspx

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using BusinessLogic;
using System.IO;

public partial class EducationInfo : AuthorizedPage
{
    private string usr, pwd, loc;
    protected void Page_Load(object sender, EventArgs e)
    {
        //ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
        //scriptManager.RegisterPostBackControl(Download);
        if (!(this.Page.IsPostBack))
        {
            start.Text = DateTime.Now.ToShortDateString();
            end.Text = DateTime.Now.ToShortDateString();
            #region Authentication Code
            try
            {
                usr = (string)Session["username"];
                pwd = (string)Session["password"];                
                if ((usr == null) || (pwd == null))
                {
                    Response.Redirect("~/login.aspx");
                }
                else
                {
                    AccountRoles ar = new AccountRoles();
                    if (!(ar.Authorization(Roles(usr, pwd), usr, pwd)))
                    {
                        ClientScript.RegisterStartupScript(typeof(Page), "warning", "<script>alert('Invalid UserName/Password')</script>");
                    }
                    else
                    {
                        string str = (string)Session["role"];
                        if (!(str.Equals("admin")))
                        {
                            Response.Redirect("~/login.aspx");
                        }
                        else
                        {
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ClientScript.RegisterClientScriptBlock(typeof(Page), "Warning", "<script>alert('" + ex.Message.ToString() + "')</script>");
            }
            #endregion
            # region Populate City DropdownList
            //Start of Populate City DropdownList
            ProcessPopulateCity populateCity = new ProcessPopulateCity();
            try
            {
                populateCity.Invoke();
            }
            catch (Exception ex)
            {
                ClientScript.RegisterClientScriptBlock(typeof(Page), "Warning", "<script>alert('" + ex.Message + "')</script>");
            }
            this.ddlLocation.DataSource = populateCity.ResultSet;
            ddlLocation.DataTextField = "loc_name";
            ddlLocation.DataValueField = "loc_id";
            this.ddlLocation.DataBind();

            //End of Populate City DropdownList
            # endregion
            
        }
        else
        {
            try
            {
                if ((Session["role"].ToString() == null))
                {
                    Response.Redirect("~/login.aspx");
                }
            }
            catch (Exception)
            {
                Response.Redirect("~/login.aspx");
            }
        }        
    }
    //protected void Page_Init(object sender, EventArgs e)
    //{
    //    AsyncPostBackTrigger trig = new AsyncPostBackTrigger();//
    //    // trig.ControlID = btnAddEduRecord.UniqueID;
    //    trig.ControlID = Download.UniqueID;//Unique ID, not client ID
    //    trig.EventName = "Click";
    //    UpdatePanel1.Triggers.Add(trig);
    //}
    protected void btnAddRecord_Click(object sender, ImageClickEventArgs e)
    {
        SqlConnection scon = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLCONN"].ToString());
        scon.Open();
        SqlTransaction sqlTrans = scon.BeginTransaction();
        try
        {
            # region Insert Education Data
            ProcessAddEducation InsertEdu = new ProcessAddEducation();
            Common.EducationInfo contact = new Common.EducationInfo();
            contact.Empno = SqlInt32.Parse(HContactID.Value.ToString());
            contact.Edu_distinction = edudegree.SelectedItem.Value.ToString();
            contact.Edu_degree = title.Text.ToString();
            if (string.IsNullOrEmpty(cgpa.Text))
            {
                contact.Edu_gpa = SqlDecimal.Null;
            }
            else
            {
                contact.Edu_gpa = SqlDecimal.Parse(cgpa.Text);
            }
            
            contact.Edu_major = majorsub.Text.ToString();
            contact.Edu_startdate = DateTime.Parse(start.Text.ToString());
            contact.Edu_enddate = DateTime.Parse(end.Text.ToString());
            contact.Edu_uni = eduni.Text.ToString();
            contact.Edu_grade = edugrade.Text.ToString();

            string myFolder = "DegreeUpload";
            string uploadPath = MappedApplicationPath + myFolder + @"\";
            contact.Edu_uploaddgre1 = UploadDegree(uploadPath);

            contact.sqlTransaction = sqlTrans;
            InsertEdu.Contact = contact;
            InsertEdu.Invoke();
            # endregion
            HEducationID.Value = contact.Eduid.ToString();
            sqlTrans.Commit();
            # region Get Edu Data
            ProcessPopulateEducationInfo populategdata = new ProcessPopulateEducationInfo();
            Common.EducationInfo edu = new Common.EducationInfo();
            edu.Empno = SqlInt32.Parse(HContactID.Value.ToString());
            populategdata.Contact = edu;
            populategdata.Invoke();
            # endregion
            # region Populate Controls
            gvEducationrData.DataSource = populategdata.ResultSet;
            gvEducationrData.DataBind();
            # endregion
            ClearFields();
            ScriptManager.RegisterStartupScript(this, typeof(Page), "test", "alert('Insertion Successfully Performed');", true);
            //ClientScript.RegisterClientScriptBlock(typeof(Page), "Information", "<script>alert('Insertion Successfully Performed')</script>");
        }
        catch (Exception ex)
        {
            sqlTrans.Rollback();
        }
        finally
        {
            scon.Close();
        }
    }
    # region Upload Image

    private string UploadDegree(string UploadPath)
    {
        string retVal = "";
        string strFileName;
        string strFilePath;
        string strType;
        string strFolder = UploadPath; //save it here
        string err = "";
        string ext = "";

        if (fuUploadDgee.HasFile)
        {
            strFileName = HEduID.Value + Path.GetExtension(fuUploadDgee.PostedFile.FileName);
            //string file_name = txtPicName.Text.ToString();

            //string name = file_name + file_ext;
            //strFileName = Path.GetFileName(fuUploadDgee.PostedFile.FileName);

            strType = fuUploadDgee.PostedFile.ContentType;
            bool allowedType = false;
            switch (strType)
            {
                case ("image/gif"):
                    allowedType = true;
                    ext = ".gif";
                    break;
                case ("image/jpg"):
                    allowedType = true;
                    ext = ".jpeg";
                    break;
                case ("image/jpeg"):
                    allowedType = true;
                    ext = ".jpeg";
                    break;
                case ("image/pjpeg"):
                    allowedType = true;
                    ext = ".jpeg";
                    break;
                case ("image/bmp"):
                    allowedType = true;
                    ext = ".bmp";
                    break;
                case ("image/png"):
                    allowedType = true;
                    ext = ".png";
                    break;
                case ("application/x-shockwave-flash"):
                    allowedType = true;
                    ext = ".swf";
                    break;
                default:
                    allowedType = false;
                    err = "The file is not an allowed file type (ie: gif, jpg, jpeg, swf)";
                    break;
            }

            if (allowedType)
            {
                // Create the directory if it does not exist.
                if (!Directory.Exists(strFolder))
                {
                    string strFolderToCreate = strFolder;
                    if (strFolder.EndsWith(@"\"))
                        strFolderToCreate = strFolder.Substring(0, (strFolderToCreate.Length - 1));

                    Directory.CreateDirectory(strFolderToCreate);
                }
                // Save the uploaded file to the server.
                strFilePath = strFolder + strFileName;

                //if (File.Exists(strFilePath))
                //{
                //    //only shows file name to user
                //    err = strFileName + " already exists on the server!";
                //}
                //else
                //{
                fuUploadDgee.PostedFile.SaveAs(strFilePath);
                retVal = strFilePath;
                //}
            }
            else //not allowed type, only images allowed
            {
                err = strFileName + " is not a valid image file.";
            }
        }
        if (err.Trim().Length > 0)
        {
            //this.litUploadError.Text = err.Trim();
            retVal = "";
        }
        return retVal; //if it returns as "false" don't continue to save.
    }

    //You should really stick this function in a different class where you can reuse it better.
    public static string MappedApplicationPath
    {
        get
        {
            string APP_PATH = System.Web.HttpContext.Current.Request.ApplicationPath.ToLower();
            if (APP_PATH == "/")      //a site
                APP_PATH = "/";
            else if (!APP_PATH.EndsWith(@"/")) //a virtual
                APP_PATH += @"/";

            string it = System.Web.HttpContext.Current.Server.MapPath(APP_PATH);
            if (!it.EndsWith(@"\"))
                it += @"\";
            return it;
        }
    }

    #endregion
    protected void btnDeleteRecord_Click(object sender, ImageClickEventArgs e)
    {
        SqlConnection scon = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLCONN"].ToString());
        scon.Open();
        SqlTransaction sqlTrans = scon.BeginTransaction();
        try
        {
            # region Delete Contact Data
            ProcessDeleteEducationInfo deleteEdu = new ProcessDeleteEducationInfo();
            Common.EducationInfo contact = new Common.EducationInfo();
            contact.Eduid = SqlInt32.Parse(HEducationID.Value.ToString());
            contact.sqlTransaction = sqlTrans;
            deleteEdu.Contact = contact;
            deleteEdu.Invoke();
            sqlTrans.Commit();
            # region Get Edu Data
            ProcessPopulateEducationInfo populategdata = new ProcessPopulateEducationInfo();
            Common.EducationInfo edun = new Common.EducationInfo();
            edun.Empno = SqlInt32.Parse(HContactID.Value.ToString());
            populategdata.Contact = edun;
            populategdata.Invoke();
            # endregion
            # region Populate Controls
            gvEducationrData.DataSource = populategdata.ResultSet;
            gvEducationrData.DataBind();
            # endregion
            ClearFields();
            ScriptManager.RegisterStartupScript(this, typeof(Page), "test", "alert('Deletion Successfully Performed');", true);
            //ClientScript.RegisterClientScriptBlock(typeof(Page), "Information", "<script>alert('Deletion Successfully Performed')</script>");
            # endregion
        }
        catch (Exception ex)
        {
            sqlTrans.Rollback();
        }
        finally
        {
            scon.Close();
        }
    }
    protected void btnUpdateRecord_Click(object sender, ImageClickEventArgs e)
    {
        SqlConnection scon = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLCONN"].ToString());
        scon.Open();
        SqlTransaction sqlTrans = scon.BeginTransaction();
        try
        {
            # region Update Education Data
            ProcessUpdateEducationInfo updateEdu = new ProcessUpdateEducationInfo();
            Common.EducationInfo contact = new Common.EducationInfo();
            contact.Empno= SqlInt32.Parse(HContactID.Value.ToString());
            contact.Edu_distinction = edudegree.SelectedItem.Value.ToString();
            contact.Edu_degree = title.Text.ToString();
            if (string.IsNullOrEmpty(cgpa.Text))
            {
                contact.Edu_gpa = SqlDecimal.Null;
            }
            else
            {
                contact.Edu_gpa = SqlDecimal.Parse(cgpa.Text);
            }
            contact.Edu_major = majorsub.Text.ToString();
            contact.Edu_startdate = DateTime.Parse(start.Text.ToString());
            contact.Edu_enddate = DateTime.Parse(end.Text.ToString());
            contact.Edu_uni = eduni.Text.ToString();
            contact.Edu_grade = edugrade.Text.ToString();
            contact.Eduid=SqlInt32.Parse(HEducationID.Value.ToString());

            string myFolder = "DegreeUpload";
            string uploadPath = MappedApplicationPath + myFolder + @"\";
            contact.Edu_uploaddgre1 = UploadDegree(uploadPath);
            if (contact.Edu_uploaddgre1 == "")
            {
                contact.Edu_uploaddgre1 = HEducationDegreeID.Value.ToString();
            }
            else
            {
                contact.Edu_uploaddgre1 = UploadDegree(uploadPath);
            }

            contact.sqlTransaction = sqlTrans;
            updateEdu.Contact=contact;
            updateEdu.Invoke();
            sqlTrans.Commit();
            # region Get Edu Data
            ProcessPopulateEducationInfo populategdata = new ProcessPopulateEducationInfo();
            Common.EducationInfo edun = new Common.EducationInfo();
            edun.Empno =SqlInt32.Parse(HContactID.Value.ToString());
            populategdata.Contact = edun;
            populategdata.Invoke();
            # endregion
            # region Populate Controls
            gvEducationrData.DataSource = populategdata.ResultSet;
            gvEducationrData.DataBind();
            # endregion
            ClearFields();
            ScriptManager.RegisterStartupScript(this, typeof(Page), "test", "alert('Updation Successfully Performed');", true);
            //ClientScript.RegisterClientScriptBlock(typeof(Page), "Information", "<script>alert('Updation Successfully Performed')</script>");
            # endregion
        }
        catch (Exception ex)
        {
            sqlTrans.Rollback();
        }
        finally
        {
            scon.Close();
        }
    }
    protected void imgbtnSearch_Click(object sender, ImageClickEventArgs e)
    {
        # region Populate Gridview in Contact Search ModalPopUp
        ProcessSearchContactInfo search = new ProcessSearchContactInfo();
        Common.Employee contact = new Common.Employee();
        if (txtSearchFName.Text != "")
        {
            // If First Name TextBox is Empty the Cursor is Here.  
            contact.FirstName = txtSearchFName.Text.ToString();
        }
        if (txtSearchCNIC.Text != "")
        {
            // If NIC TextBox is Empty the Cursor is Here.
            contact.CNIC = txtSearchCNIC.Text.ToString();
        }
        # region Populate Gridview of Search Contact
        // Start of Search Contact///
        search.Contact = contact;
        try
        {
            search.Invoke();
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Warning", "<script>alert('" + ex.Message + "')</script>", false);
        }
        //To clear or show the message Record not found    
        DataSet ds = search.ResultSet;
        if (ds.Tables[0].Rows.Count == 0)
        {
            lbEmptyRecordContact.Text = "No Records Found";
            gvSearchContact.DataSource = search.ResultSet;
            gvSearchContact.DataBind();
        }
        else
        {
            lbEmptyRecordContact.Text = "";
            gvSearchContact.DataSource = search.ResultSet;
            gvSearchContact.DataBind();
        }
        # endregion
        # endregion
        mpeSearchContact.Show();
    }
    protected void btnOK_Click(object sender, ImageClickEventArgs e)
    {
        txtSearchCNIC.Text = "";
        txtSearchFName.Text = "";
        gvSearchContact.DataSource = null;
        gvSearchContact.DataBind();
        SqlConnection scon = new SqlConnection(ConfigurationManager.ConnectionStrings["SQLCONN"].ToString());
        try
        {
            # region Get Contact Data
            ProcessPopulateContactInfo populatedata = new ProcessPopulateContactInfo();
            Common.Employee contact = new Common.Employee();
            contact.EmployeeNo = SqlInt32.Parse(HContactID.Value.ToString());
            populatedata.Contact = contact;
            populatedata.Invoke();
            # endregion

            # region Populate Controls

            txtempID.Text = populatedata.ResultSet.Tables[0].Rows[0][1].ToString();
            txtattendID.Text = populatedata.ResultSet.Tables[0].Rows[0][2].ToString();
            for (int i = 0; i <= ddlapplicant.Items.Count - 1; i++)
            {
                if (ddlapplicant.Items[i].Value.Equals(populatedata.ResultSet.Tables[0].Rows[0][3].ToString()))
                {
                    ddlapplicant.SelectedIndex = i;
                }
            }
            for (int t = 0; t <= ddlTitle.Items.Count - 1; t++)
            {
                if (ddlTitle.Items[t].Value.Equals(populatedata.ResultSet.Tables[0].Rows[0][33].ToString()))
                {
                    ddlTitle.SelectedIndex = t;
                }
            }
            txtfname.Text = populatedata.ResultSet.Tables[0].Rows[0][4].ToString();
            txtLastName.Text = populatedata.ResultSet.Tables[0].Rows[0][5].ToString();
            txtNIC.Text = populatedata.ResultSet.Tables[0].Rows[0][6].ToString();
            txtSSN.Text = populatedata.ResultSet.Tables[0].Rows[0][10].ToString();
            for (int l = 0; l <= ddlStatus.Items.Count - 1; l++)
            {
                if (ddlStatus.Items[l].Value.Equals(populatedata.ResultSet.Tables[0].Rows[0][16].ToString()))
                {
                    ddlStatus.SelectedIndex = l;
                }
            }
            txtCurrentAdd.Text = populatedata.ResultSet.Tables[0].Rows[0][13].ToString();
            txtCellPhone.Text = populatedata.ResultSet.Tables[0].Rows[0][24].ToString();
            txtDepartment.Text = populatedata.ResultSet.Tables[0].Rows[0][37].ToString();
            for (int c = 0; c 

Edited by __avd: Added [code]..[/code] tags.

2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by Ramesh S
0

i get the error

A control with ID 'btnAddEduRecord' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.
any 1 plz help me

0

Hi,

The FileUpload control is not not compatible with UpdatePanel control. Please read section 'Controls that Are Not Compatible with UpdatePanel Controls' in the following MSDN link.

UpdatePanel Control Overview

Alternatively, You can try to use the following solutions:

Simple AJAX File Upload

swfupload - It is a third party component which uses javascript and flash. It is free and open source.

Edited by Ramesh S: n/a

0

Hi,

Do you mean that the FileUpload control is working properly in other pages where UpdatePanel control is used?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.