update parameter from a templatefeild
<p>I have added a gridview which is populated with data when i select a value in a dropdown feild.I added a templatefeild into the gridview which is a dropdown list.</p>

<p>I have added edit command button to the gridview to make updates just to the templatefeild
When i use the update button it errors out on me with the below error</p>

<p><strong>Error</strong>
Could not find control 'dropdownlist1' in ControlParameter 'reassignto'. </p>

<p>why am i unable to use the templatefeild dropdownlist to pass a parameter?</p>

<p>
    
    
     
        
        
        
        
            
                
                
                " SelectCommand="SELECT Contact_id,first_name + space(1) +LAST_name as [Analystname] from contact
where busunitid =14
order by first_name"></p>

<pre><code>            &lt;/asp:SqlDataSource&gt;
        &lt;/ItemTemplate&gt;
    &lt;/asp:TemplateField&gt;
&lt;/Columns&gt;
&lt;EditRowStyle BackColor="#2461BF" /&gt;
&lt;FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
&lt;HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
&lt;PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /&gt;
&lt;RowStyle BackColor="#EFF3FB" /&gt;
&lt;SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /&gt;
&lt;SortedAscendingCellStyle BackColor="#F5F7FB" /&gt;
&lt;SortedAscendingHeaderStyle BackColor="#6D95E1" /&gt;
&lt;SortedDescendingCellStyle BackColor="#E9EBEF" /&gt;
&lt;SortedDescendingHeaderStyle BackColor="#4870BE" /&gt;
&lt;/asp:GridView&gt;



&lt;asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="&lt;%$ ConnectionStrings:Underwriting %&gt;" 

    SelectCommand="SELECT SR.requestid,SR.rptdesc,SR.rptdesc, RD.rptdesctext, C.first_name + SPACE(1) + C.last_name AS [Assigned analyst],SR.reassignto FROM dbo.SELECTED_REPORT AS SR INNER JOIN dbo.REPORT_DESCRIPTION AS RD ON SR.rptdesc = RD.rptdesc INNER JOIN dbo.contact AS C ON SR.assignto = C.contact_id WHERE (SR.requestid = @requestid)"
     UpdateCommand = "UPDATE dbo.SELECTED_REPORT SET Reassignto = @reassignto WHERE (requestid = @requestid) AND (rptdesc = @rptdesc)"&gt;
    &lt;SelectParameters&gt;
        &lt;asp:ControlParameter ControlID="requestid" DefaultValue="1" Name="requestid" 
            PropertyName="SelectedValue" /&gt;
    &lt;/SelectParameters&gt;
    &lt;UpdateParameters&gt;
        &lt;asp:ControlParameter ControlID="dropdownlist1" DefaultValue="1" Name="reassignto" 
            PropertyName="SelectedValue" /&gt;
    &lt;/UpdateParameters&gt;


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