The name 'grdUserActivity' does not exist in the current context
<p>I have a grid that is named grdUserActivity.  I'm not sure what the error means.</p>

<p>The name 'grdUserActivity' does not exist in the current context</p>

<p>C#</p>

<pre><code>public partial class frmViewPersonnel : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            // Declares the DataSet
            dsUserActivity myDataSet = new dsUserActivity();

            // Fill the dataset with what is returned from the function
            myDataSet = clsDataLayer.GetUserActivity(Server.MapPath("PayrollSystem_DB.mdb"));

            // Sets the DataGrid to the DataSource based on the table
            grdUserActivity.DataSource = myDataSet.Tables["tblUserActivity"];

            // Binds the DataGrid
            grdUserActivity.DataBind();
        }
    }
}
</code></pre>

<p>.ASPX</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="frmPersonnel.aspx.cs"      Inherits="frmPersonnel" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head runat="server"&gt;
    &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form id="form1" runat="server"&gt;
&lt;div align="center"&gt;

&lt;/div&gt;
&lt;asp:Panel ID="Panel1" runat="server" Height="250px" HorizontalAlign="Left" 
    Width="300px"&gt;
    &lt;asp:Label ID="Label1" runat="server" Text="First Name:" Width="80px"&gt;&lt;/asp:Label&gt;
    &lt;asp:TextBox ID="txtFirstName" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;asp:Label ID="Label2" runat="server" Text="Last Name:" Width="80px"&gt;&lt;/asp:Label&gt;
    &lt;asp:TextBox ID="txtLastName" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;asp:Label ID="Label3" runat="server" Text="Pay Rate:" Width="80px"&gt;&lt;/asp:Label&gt;
    &lt;asp:TextBox ID="txtPayRate" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;asp:Label ID="Label4" runat="server" Text="Start Date:" Width="80px"&gt;&lt;/asp:Label&gt;
    &lt;asp:TextBox ID="txtStartDate" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;asp:Label ID="Label5" runat="server" Text="End Date:" Width="80px"&gt;&lt;/asp:Label&gt;
    &lt;asp:TextBox ID="txtEndDate" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;asp:Button ID="btnSubmit" runat="server" 
        PostBackUrl="~/frmPersonnalVerified.aspx" Text="Submit" 
        onclick="btnSubmit_Click" /&gt;
    &lt;asp:Button ID="btnCancel" runat="server" Text="Cancel" /&gt;
    &lt;br /&gt;
    &lt;asp:Label ID="lblError" runat="server"&gt;&lt;/asp:Label&gt;
&lt;/asp:Panel&gt;
&lt;/form&gt;
</code></pre>

<p>
</p>
