I have a DetailsView
with multiple fields and a DropDownList
that should update the sexoAnimal
field with Male (M) or Female (F).
I added a ControlParameter
to SqlDataSource
, the parameter takes the selected value in DropDown
.
If I leave DropDownList
inside DetailsView
, it gives this error:
The 'sexDrop' control in ControlParameter 'sexC' could not be found.
If I take it out of DetailsView
(example: below), it updates the Sexo
field normally.
What can / should I do to work within DetailsView
?
DropDown Code:
<asp:DropDownList ID="sexoDrop" runat="server">
<asp:ListItem Value="M">Macho</asp:ListItem>
<asp:ListItem Value="F">Fêmea</asp:ListItem>
</asp:DropDownList>
Parameter:
<asp:ControlParameter Name="sexoC" ControlID="sexoDrop" PropertyName="SelectedValue" />