Asp.net controls are not accessible in code behind
<p>I have a project that was previously built by someone else. When I try to add a new control to the page, I can't access it in the code behind. When I try to access it there's an error message that the Control is not defined in the current context.</p>

<pre><code>&lt;%@ Page Language="C#" MasterPageFile="~/HRMS.Master" AutoEventWireup="true"     CodeBehind="manageEmployee.aspx.cs" Inherits="HRMS.manageEmployee" Title="Untitled Page" %&gt;

&lt;%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %&gt;
&lt;%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %&gt;


&lt;asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"&gt;
&lt;/asp:Content&gt;
&lt;asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"&gt;
    &lt;script type="text/javascript"&gt;
    document.getElementById("employee").setAttribute("class", "selected");
    &lt;/script&gt;
&lt;!--OPEN CONTENT DIV--&gt;

     &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
     &lt;/asp:ScriptManager&gt;
    &lt;!-- Only this area is updated on PostBack --&gt;

&lt;div class="manage_employ"&gt;

    &lt;ul&gt;
        &lt;li style="margin-top:10px; margin-bottom:15px"&gt;&lt;input type="image" src="images/img_manageEmployee01.png"/&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
        &lt;li&gt;First name&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtFirstName"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorFirstName" runat="server" ErrorMessage="*" ControlToValidate="txtFirstName"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;li&gt;Last name&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtLastName"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorLastname" runat="server" ErrorMessage="*" ControlToValidate="txtLastName"&gt;&lt;/asp:RequiredFieldValidator&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
        &lt;li&gt;CNIC&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtCNIC"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorCNIC" runat="server" ErrorMessage="*" ControlToValidate="txtCNIC"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;li&gt;Blood Group&lt;/li&gt;
        &lt;li&gt;&lt;asp:DropDownList runat="server" class="text_input" id="ddlBloodGroup"&gt;
        &lt;asp:ListItem&gt;A+&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;B+&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;AB+&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;A-&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;B-&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;AB-&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;O+&lt;/asp:ListItem&gt;
        &lt;asp:ListItem&gt;O-&lt;/asp:ListItem&gt;
        &lt;/asp:DropDownList&gt;
        &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
        &lt;li&gt;Mobile&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtMobile"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorMobile" runat="server" ErrorMessage="*" ControlToValidate="txtMobile"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;li&gt;Phone&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtPhone"/&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;


    &lt;/ul&gt;

    &lt;ul&gt;
        &lt;li&gt;E-Mail&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtEmail"/&gt;&lt;/li&gt;
        &lt;asp:RegularExpressionValidator ID="valEmail" ControlToValidate="txtEmail" runat="server" ErrorMessage="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"&gt;*&lt;/asp:RegularExpressionValidator&gt;
        &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
            &lt;ContentTemplate&gt;
            &lt;li&gt;Maritial Status&lt;/li&gt;
            &lt;li&gt;
            &lt;asp:RadioButton ID="rbtnMarried" AutoPostBack="true" runat="server" oncheckedchanged="rbtnMarried_CheckedChanged"/&gt;Married
            &lt;asp:RadioButton ID="rbtnUnmarried" AutoPostBack="true" runat="server" 
                    oncheckedchanged="rbtnUnmarried_CheckedChanged"/&gt;Unmarried
            &lt;/li&gt;
            &lt;/ContentTemplate&gt;
        &lt;/asp:UpdatePanel&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
        &lt;li&gt;Permanant Address&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtPermanantAddress"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorPAddress" runat="server" ErrorMessage="*" ControlToValidate="txtPermanantAddress"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;li&gt;Temporary Address&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtTemporaryAddress"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorTAddress" runat="server" ErrorMessage="*" ControlToValidate="txtTemporaryAddress"&gt;&lt;/asp:RequiredFieldValidator&gt;
    &lt;/ul&gt;


    &lt;ul&gt;
        &lt;li&gt;Salary&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtSalary"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorSalary" runat="server" ErrorMessage="*" ControlToValidate="txtSalary"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;li&gt;Joining Date&lt;/li&gt;

             &lt;li&gt;
        &lt;%--&lt;ew:calendarpopup ID="calJoiningDate" runat="server"&gt;&lt;/ew:calendarpopup&gt;--%&gt;
                  &lt;asp:TextBox ID="CalJoiningDate1" runat="server" CssClass="text_input"&gt;&lt;/asp:TextBox&gt;
                  &lt;cc1:CalendarExtender ID="CalJoiningDate1_CalendarExtender" runat="server" 
                       Enabled="True" TargetControlID="CalJoiningDate1"&gt;
                  &lt;/cc1:CalendarExtender&gt;
        &lt;/li&gt;


    &lt;/ul&gt;
    &lt;ul&gt;
        &lt;li&gt;Job Area&lt;/li&gt;
        &lt;li&gt;&lt;asp:DropDownList runat="server" class="text_input" id="ddlJobArea"/&gt;&lt;/li&gt;
        &lt;li&gt;Desigantion&lt;/li&gt;
        &lt;li&gt;&lt;asp:DropDownList runat="server" class="text_input" id="ddlDesignation"/&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;asp:UpdatePanel ID="updatePnl" runat="server"&gt;
    &lt;ContentTemplate&gt;    
    &lt;div&gt;
    &lt;ul&gt;
        &lt;li style="margin-top:20px; margin-bottom:15px"&gt;&lt;input type="image" src="images/img_jobHistory.png"  /&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
    &lt;li&gt;Company&lt;/li&gt;
   &lt;%--&lt;asp:DropDownList runat="server" class="text_input" id="ddlCompany" 
              onselectedindexchanged="ddlCompany_SelectedIndexChanged"/&gt;--%&gt;
          &lt;li&gt;&lt;asp:TextBox ID="CompanyNames" runat="server" CssClass="text_input"&gt;&lt;/asp:TextBox&gt; 
               &lt;cc1:AutoCompleteExtender ID="CompanyNames_AutoCompleteExtender" runat="server" 
                    DelimiterCharacters="" Enabled="True" ServicePath="getCompanies.asmx" ServiceMethod="getCompaniesMethod" MinimumPrefixLength="1" 
                    TargetControlID="CompanyNames" UseContextKey="True"&gt;
               &lt;/cc1:AutoCompleteExtender&gt;
               &lt;li&gt;Job Duration&lt;/li&gt;
               &lt;li&gt;
                    &lt;asp:TextBox ID="txtJobDuration" runat="server" class="text_input" /&gt;
               &lt;/li&gt;
               &lt;asp:RequiredFieldValidator ID="validatorJobDuration" runat="server" 
                    ControlToValidate="txtJobDuration" ErrorMessage="*" 
                    ValidationGroup="jobHistory"&gt;&lt;/asp:RequiredFieldValidator&gt;
         &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
    &lt;li&gt;Job Area&lt;/li&gt;
    &lt;li&gt;&lt;asp:DropDownList runat="server" class="text_input" id="ddlJobHistJobArea"/&gt;&lt;/li&gt;
    &lt;li&gt;Designation&lt;/li&gt;
    &lt;li&gt;&lt;asp:DropDownList runat="server" class="text_input" id="ddlJobHistoryDesignation"/&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
    &lt;li&gt;Last Drawn Salary&lt;/li&gt;
    &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtLastDrawnSalary"/&gt;
         &lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorLastDrawnSalary" runat="server" ValidationGroup="jobHistory" ErrorMessage="*" ControlToValidate="txtLastDrawnSalary"&gt;&lt;/asp:RequiredFieldValidator&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
        &lt;li style="margin-left:160px"&gt;
            &lt;asp:ImageButton src="images/btn_Add.png" runat="server" ID="btnAddJobHistory" onclick="btnAddJobHistory_Click" CausesValidation="True" ValidationGroup="jobHistory"/&gt;
            &lt;asp:ImageButton src="images/btnReset.png" runat="server" ID="btnResetJH" CausesValidation="False" onclick="btnResetJH_Click"/&gt;
        &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul style="margin-left:30px"&gt;
    &lt;asp:GridView ID="grdJobHistory" runat="server" AutoGenerateColumns="False" Width="798px" 
            AllowPaging="True" 
        onpageindexchanging="grdJobHistory_PageIndexChanging" 
        onrowcommand="grdJobHistory_RowCommand" 
            onrowdeleting="grdJobHistory_RowDeleting" 
            onrowediting="grdJobHistory_RowEditing" Font-Bold="True" 
            Font-Names="Calibri" Font-Size="Medium" ForeColor="White" PageSize="5"&gt;
            &lt;Columns&gt;
                &lt;asp:BoundField DataField="EmployeeExperianceId" 
                    HeaderText="EmployeeExperianceId" /&gt;
                &lt;asp:BoundField HeaderText="Company" DataField="CompanyName" ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField DataField="JobAreaName" HeaderText="Job Area" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Smaller" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Designation" DataField="DesignationName" 
                    ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Experiance Duration" DataField="ExperianceDuration" 
                    ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Salary" DataField="LastDrawnSalary" ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:TemplateField AccessibleHeaderText="Edit" HeaderText="Edit"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:ImageButton ID="imgBtnEdit" runat="server" ImageUrl="images/updateIcon.png" CausesValidation="False" CommandName="Edit" CommandArgument='&lt;%# DataBinder.Eval(Container.DataItem, "EmployeeExperianceId") %&gt;'/&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField AccessibleHeaderText="Delete" HeaderText="Delete"&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:ImageButton ID="imgBtnDelete" runat="server" ImageUrl="images/deleteIcon.png" CausesValidation="False" CommandName="Delete" CommandArgument='&lt;%# DataBinder.Eval(Container.DataItem, "EmployeeExperianceId") %&gt;' OnClientClick="return confirm('Are you sure you want to delete this record...');"/&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
            &lt;/Columns&gt;
            &lt;HeaderStyle BackColor="#5D92B9" BorderStyle="None" /&gt;
            &lt;AlternatingRowStyle BackColor="#AAAAAA" /&gt;
        &lt;/asp:GridView&gt;
    &lt;/ul&gt;

    &lt;/div&gt;

    &lt;div&gt;
    &lt;ul&gt;
        &lt;li style="margin-top:20px; margin-bottom:15px"&gt;&lt;input type="image" src="images/img_skillDetail.png"  /&gt;&lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
        &lt;li&gt;Skill&lt;/li&gt;
        &lt;!--&lt;li&gt;&lt;asp:DropDownList runat="server" class="text_input" id="ddlSkill"/&gt;&lt;/li&gt;--&gt;
        &lt;li&gt;
             &lt;asp:TextBox ID="SkillAutoComplete" runat="server" CssClass="text_input"&gt;&lt;/asp:TextBox&gt;
             &lt;cc1:AutoCompleteExtender ID="SkillAutoComplete_AutoCompleteExtender" 
                  runat="server" DelimiterCharacters="" Enabled="True" ServicePath="getSkills.asmx" ServiceMethod="getAllSkills" MinimumPrefixLength="1" 
                  TargetControlID="SkillAutoComplete"&gt;
             &lt;/cc1:AutoCompleteExtender&gt;
         &lt;/li&gt;
        &lt;li&gt;Skill Detail&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtSkillDetail"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorSkillDetail" runat="server" ValidationGroup="skill" ErrorMessage="*" ControlToValidate="txtSkillDetail"&gt;&lt;/asp:RequiredFieldValidator&gt;
    &lt;/ul&gt;    

    &lt;ul&gt;
        &lt;li style="margin-left:160px"&gt;
            &lt;asp:ImageButton src="images/btn_Add.png" runat="server" ID="btnAddSkill" CausesValidation="True" ValidationGroup="skill" onclick="btnAddSkill_Click"/&gt;
            &lt;asp:ImageButton src="images/btnReset.png" runat="server" ID="btnResetSkill" CausesValidation="False" onclick="btnResetSkill_Click"/&gt;
        &lt;/li&gt;
    &lt;/ul&gt;    

    &lt;ul style="margin-left:30px"&gt;
    &lt;asp:GridView ID="grdSkill" runat="server" AutoGenerateColumns="False" Width="798px" 
            AllowPaging="True" 
        onpageindexchanging="grdSkill_PageIndexChanging" 
        onrowcommand="grdSkill_RowCommand" 
            onrowdeleting="grdSkill_RowDeleting" 
            onrowediting="grdSkill_RowEditing" Font-Bold="True" 
            Font-Names="Calibri" Font-Size="Medium" ForeColor="White" PageSize="5"&gt;
            &lt;Columns&gt;
                &lt;asp:BoundField HeaderText="EmployeeSkillId" DataField="EmployeeSkillId" &gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField DataField="SkillName" HeaderText="Skill Name" ReadOnly="True"&gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Skill Detail" DataField="SkillDetail" 
                    ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:TemplateField&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:ImageButton ID="imgBtnEdit" runat="server" ImageUrl="images/updateIcon.png" CausesValidation="false" CommandName="Edit" CommandArgument='&lt;%# DataBinder.Eval(Container.DataItem, "EmployeeSkillId") %&gt;'/&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:ImageButton ID="imgBtnDelete" runat="server" ImageUrl="images/deleteIcon.png" CommandName="Delete" CommandArgument='&lt;%# DataBinder.Eval(Container.DataItem, "EmployeeSkillId") %&gt;' OnClientClick="return confirm('Are you sure you want to delete this record...');"/&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
            &lt;/Columns&gt;
            &lt;HeaderStyle BackColor="#5D92B9" BorderStyle="None" /&gt;
            &lt;AlternatingRowStyle BackColor="#AAAAAA" /&gt;
        &lt;/asp:GridView&gt;
    &lt;/ul&gt;
    &lt;/div&gt;

    &lt;div&gt;       
    &lt;ul&gt;
        &lt;li style="margin-top:20px; margin-left:20px; margin-bottom:15px"&gt;&lt;input type="image" src="images/img_qualificationDetail.png"  /&gt;&lt;/li&gt;
    &lt;/ul&gt;    

    &lt;ul&gt;
        &lt;li&gt;Course&lt;/li&gt;
        &lt;li&gt;&lt;asp:DropDownList runat="server" class="text_input" id="ddlCourse"/&gt;&lt;/li&gt;
        &lt;li&gt;Institution&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtInstitution"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorInsitution" runat="server" ValidationGroup="course" ErrorMessage="*" ControlToValidate="txtInstitution"&gt;&lt;/asp:RequiredFieldValidator&gt;
    &lt;/ul&gt;        

    &lt;ul&gt;
        &lt;li&gt;Duration&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtCourseDuration"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorDuration" runat="server" ValidationGroup="course" ErrorMessage="*" ControlToValidate="txtCourseDuration"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;li&gt;Passing Year&lt;/li&gt;
        &lt;li&gt;
             &lt;asp:TextBox ID="calPassingYear1" runat="server" CssClass="text_input"&gt;&lt;/asp:TextBox&gt;

        &lt;/li&gt;
        &lt;!--&lt;li&gt;&lt;ew:CalendarPopup ID="calPassingYear" runat="server"&gt;&lt;/ew:CalendarPopup&gt;&lt;/li&gt;--&gt;
    &lt;/ul&gt;        

    &lt;ul&gt;
        &lt;li&gt;Marks/Percentage/GPA&lt;/li&gt;
        &lt;li&gt;&lt;asp:TextBox runat="server" class="text_input" id="txtMarksPercentage"/&gt;&lt;/li&gt;
        &lt;asp:RequiredFieldValidator ID="validatorMarks" runat="server" ValidationGroup="course" ErrorMessage="*" ControlToValidate="txtMarksPercentage"&gt;&lt;/asp:RequiredFieldValidator&gt;
        &lt;li style="margin-left:160px"&gt;
        &lt;asp:ImageButton src="images/btn_Add.png" runat="server" ID="btnAddCourse" CausesValidation="True" onclick="btnAddCourse_Click" ValidationGroup="course"/&gt;
        &lt;asp:ImageButton src="images/btnReset.png" runat="server" ID="btnResetCourse" CausesValidation="False" onclick="btnResetCourse_Click" /&gt;
        &lt;/li&gt;
    &lt;/ul&gt;        

    &lt;ul style="margin-left:30px"&gt;
    &lt;asp:GridView ID="grdCourse" runat="server" AutoGenerateColumns="False" Width="798px" 
            AllowPaging="True" 
        onpageindexchanging="grdCourse_PageIndexChanging" 
        onrowcommand="grdCourse_RowCommand" 
            onrowdeleting="grdCourse_RowDeleting" 
            onrowediting="grdCourse_RowEditing" Font-Bold="True" 
            Font-Names="Calibri" Font-Size="Medium" ForeColor="White" PageSize="5"&gt;
            &lt;Columns&gt;
                &lt;asp:BoundField DataField="EmployeeQualificationId" 
                    HeaderText="EmployeeQualificationId" /&gt;
                &lt;asp:BoundField HeaderText="Course" DataField="CourseTitle" ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Institution" DataField="InstitutionName" 
                    ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Duration" DataField="Duration" 
                    ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Passing Year" DataField="YearOfPassing" 
                    ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:BoundField HeaderText="Marks/Percentage/GPA" DataField="MarksPercentage" 
                    ReadOnly="True" &gt;
                    &lt;ItemStyle Font-Names="Calibri,Verdana,Arial,Helvetica,sans-serif" 
                        Font-Size="Small" ForeColor="#3F4A53" /&gt;
                &lt;/asp:BoundField&gt;
                &lt;asp:TemplateField&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:ImageButton ID="imgBtnEdit" runat="server" ImageUrl="images/updateIcon.png" CausesValidation="false" CommandName="Edit" CommandArgument='&lt;%# DataBinder.Eval(Container.DataItem, "EmployeeQualificationId") %&gt;'/&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:TemplateField&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:ImageButton ID="imgBtnDelete" runat="server" ImageUrl="images/deleteIcon.png" CommandName="Delete" CommandArgument='&lt;%# DataBinder.Eval(Container.DataItem, "EmployeeQualificationId") %&gt;' OnClientClick="return confirm('Are you sure you want to delete this record...');"/&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
            &lt;/Columns&gt;
            &lt;HeaderStyle BackColor="#5D92B9" BorderStyle="None" /&gt;
            &lt;AlternatingRowStyle BackColor="#AAAAAA" /&gt;
        &lt;/asp:GridView&gt;
    &lt;/ul&gt;
    &lt;/div&gt;
    &lt;/ContentTemplate&gt;
      &lt;/asp:UpdatePanel&gt;        
    &lt;ul&gt;
       &lt;li style="margin-left:90px; margin-bottom:10px;"&gt;
       &lt;asp:ImageButton ID="btnSubmit" AlternateText="submit button" runat="server" src="images/btn_Submit.png" onclick="btnSubmit_Click"/&gt;
       &lt;/li&gt;
    &lt;/ul&gt;
&lt;/div&gt;
            &lt;!--CLOSE CONTENT DIV--&gt;

&lt;/asp:Content&gt;
</code></pre>

<p>For Example:</p>

<p>When I was trying to add some asp.net server side controls like <code>&lt;asp:testBox id="txtBox" runat="server"/&gt;</code> it is not accessible in the code behind.  Error: txtBox is not defined in the current Context ...<br>
What am I doing wrong?</p>
