0
I have a DetailsView
with several fields and a DropDownList
that should update the field sexoAnimal
with Male (M) or Female (F).
I added a ControlParameter
in the SqlDataSource
, the parameter takes the value selected in DropDown
.
If I leave the DropDownList
within the DetailsView
, he makes that mistake:
Unable to find'sexDrop 'control in Controlparameter'sexoC'.
If I pull him out of the DetailsView
(example: below), it updates the field Sexo
normally.
What can/should I do to work inside the DetailsView
?
Cód Dropdown:
<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" />
You could post a larger chunk of code from your APSX and tbm from your source ASPX.Cs q calls the methods?
– Tafarel Chicotti
@tchicotti, everything is being done in . aspx, using the Detailsview components with Sqldatasource.
– GutoSchiavon