Error in parameter that i use in update command in sqlDataSource
<p>I use below code : </p>

<p><strong>.aspx</strong></p>

<pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" ConnectionString="&lt;%$ConnectionStrings:Con %&gt;" runat="server" 
        SelectCommand="select * from DorePayvar" OnSelecting="selecting" 
        UpdateCommand="update DorePayvar set Name=@name" OnUpdating="SqlDataSource1_Updating"&gt;
        &lt;UpdateParameters&gt;
            &lt;asp:Parameter Type="String" Name="name" DefaultValue="Sajjad" /&gt;
        &lt;/UpdateParameters&gt;
        &lt;/asp:SqlDataSource&gt; 
</code></pre>

<p><strong>.cs</strong></p>

<pre><code>protected void SqlDataSource1_Updating(object sender, SqlDataSourceCommandEventArgs e)
    {
        e.Command.Parameters["name"].Value = "bvhjbjh";   
    }
</code></pre>

<p>but when i press update button occur below error</p>

<blockquote>
  <p>An SqlParameter with ParameterName 'name' is not contained by this
  SqlParameterCollection.</p>
</blockquote>
