ASP.NET Formview not correctly Updating
<p>I'm converting my website from Classic ASP to ASP.net and outside of a few bumps, I've had no problems until today. But I am learning on the fly.</p>

<p>I'm trying to update a record in a formview and every time I do, I get the following error: "Must declare the scalar variable "@FirstName"". </p>

<p>I've googled and searched, and can't see what I'm doing wrong. I'm sure there's something little that I'm doing incorrect.</p>

<pre><code>      &lt;asp:FormView ID="formRecruit" runat="server" DataSourceID="sourceRecruit" 
        EnableModelValidation="True" DataKeyNames="ID"&gt;
    &lt;ItemTemplate&gt;
        &lt;asp:Table ID="Table1" Width="100%" runat="server"&gt;         
            &lt;asp:TableRow ID="TableRow1" runat="server"&gt;
                &lt;asp:TableCell Width="50%"&gt;
                &lt;asp:Table ID="Table2" Width="100%" HorizontalAlign="Center" runat="server"&gt;
                &lt;asp:TableRow ID="TableRow2" runat="server"&gt;
                &lt;asp:TableCell&gt;
                &lt;asp:Table ID="Table3" Width="100%" runat="server"&gt;  
                    &lt;asp:TableRow ID="TableRow3" runat="server"&gt;
                        &lt;asp:TableCell&gt;Name:&lt;/asp:TableCell&gt;
                        &lt;asp:TableCell&gt;&lt;%#Eval("FirstName") %&gt;&lt;/asp:TableCell&gt;
                        &lt;asp:TableCell&gt;&lt;asp:LinkButton runat="server" Text="Edit" CommandName="Edit" ID="LinkButton1" /&gt;&lt;/asp:TableCell&gt;
                    &lt;/asp:TableRow&gt;
                &lt;/asp:Table&gt; 
    &lt;/ItemTemplate&gt;
    &lt;EditItemTemplate&gt;
        &lt;asp:Table ID="Table1" Width="100%" runat="server"&gt;         
            &lt;asp:TableRow ID="TableRow1" runat="server"&gt;
                &lt;asp:TableCell Width="50%"&gt;
                &lt;asp:Table ID="Table2" Width="100%" HorizontalAlign="Center" runat="server"&gt;
                &lt;asp:TableRow ID="TableRow2" runat="server"&gt;
                &lt;asp:TableCell&gt;
                &lt;asp:Table ID="Table3" Width="100%" runat="server"&gt;  
                    &lt;asp:TableRow ID="TableRow3" runat="server"&gt;
                        &lt;asp:TableCell&gt;Name:&lt;/asp:TableCell&gt;
                        &lt;asp:TableCell&gt;&lt;asp:TextBox ID="txtFirstName" runat="server" Text='&lt;%#Bind("FirstName") %&gt;'/&gt;&lt;/asp:TableCell&gt;
                        &lt;asp:TableCell&gt;&lt;asp:LinkButton runat="server" Text="Update" CommandName="Update" ID="LinkButton1" /&gt;&lt;asp:LinkButton runat="server" Text="Cancel" CommandName="Cancel" ID="LinkButton2" CausesValidation="false" /&gt;&lt;/asp:TableCell&gt;
                    &lt;/asp:TableRow&gt;
                &lt;/asp:Table&gt; 
&lt;/EditItemTemplate&gt;
&lt;/asp:FormView&gt;
&lt;asp:SqlDataSource ID="sourceRecruit" runat="server" 
    ProviderName="System.Data.SqlClient"
    ConnectionString="&lt;%$ ConnectionStrings:DBCS %&gt;" 
    SelectCommand="SELECT * FROM [Players] WHERE ([ID] = @ID)" 
    UpdateCommand="UPDATE [Players] SET [FirstName] = @FirstName WHERE [ID] = @ID"&gt; 
    &lt;SelectParameters&gt;
        &lt;asp:QueryStringParameter QueryStringField="ID" Name="ID" Type="Int32" /&gt;
    &lt;/SelectParameters&gt;
    &lt;/asp:SqlDataSource&gt;
</code></pre>
