The name 'EVAL' does not exist in the current context
<p>I am adding a button in the header of the grid view but it returns an error as 'The name EVAL does not exist in the current context'. I don't know why it comes? Please suggest me any solution regarding the same.</p>

<p>Thanks in advance.</p>

<p><strong>Code:</strong></p>

<pre><code> &lt;asp:gridview id="CustomersGridView" 
        datasourceid="AccessDataSource1"   
        autogeneratecolumns="False"
        allowpaging="True"
        PageSize="3"
        ondatabound="CustomersGridView_DataBound"  
        runat="server" DataKeyNames="CompanyId"&gt;

          &lt;Columns&gt;
              &lt;asp:BoundField DataField="CompanyId" HeaderText="CompanyId" 
                  InsertVisible="False" ReadOnly="True" SortExpression="CompanyId" /&gt;
              &lt;asp:BoundField DataField="CompanyFName" HeaderText="CompanyFName" 
                  SortExpression="CompanyFName" /&gt;
              &lt;asp:BoundField DataField="CompanySName" HeaderText="CompanySName" 
                  SortExpression="CompanySName" /&gt;
              &lt;asp:BoundField DataField="CompanyAddress" HeaderText="CompanyAddress" 
                  SortExpression="CompanyAddress" /&gt;
                   &lt;asp:TemplateField&gt;
                &lt;HeaderTemplate&gt;
                    &lt;asp:Button runat="server" ID="btnFamily" CommandName="FamilyClicked" /&gt;
                &lt;/HeaderTemplate&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Literal runat="server" ID="litFamily" Text='&lt;%# EVAL("CompanyAddress") %&gt;'&gt;&lt;/asp:Literal&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;

          &lt;/Columns&gt;

        &lt;pagerstyle forecolor="Blue"
          backcolor="LightBlue"/&gt;

        &lt;pagertemplate&gt;

          &lt;table width="100%"&gt;                    
            &lt;tr&gt;                        
              &lt;td style="width:70%"&gt;

                &lt;asp:label id="MessageLabel"
                  forecolor="Blue"
                  text="Select a page:" 
                  runat="server"/&gt;
                &lt;asp:dropdownlist id="PageDropDownList"
                  autopostback="true"
                  onselectedindexchanged="PageDropDownList_SelectedIndexChanged" 
                  runat="server"/&gt;

              &lt;/td&gt;   

              &lt;td style="width:70%; text-align:right"&gt;

                &lt;asp:label id="CurrentPageLabel"
                  forecolor="Blue"
                  runat="server"/&gt;

              &lt;/td&gt;

            &lt;/tr&gt;                    
          &lt;/table&gt;

        &lt;/pagertemplate&gt; 

      &lt;/asp:gridview&gt;

      &lt;asp:AccessDataSource ID="AccessDataSource1" runat="server" 
          DataFile="~/eTimeTrackLite1.mdb" 
          SelectCommand="SELECT [CompanyId], [CompanyFName], [CompanySName], [CompanyAddress] FROM [Companies]"&gt;
      &lt;/asp:AccessDataSource&gt;
</code></pre>
