Could not find control 'X' in ControlParameter 'Y'
Error Description
The error occurs in the following scenario if the ControlParameter.ControlID value is incorrect:
- An application uses data source controls (SqlDataSource, AccessDataSource, ObjectDataSource).
- The ControlParameter is specified for one of its parameters.
- The control referenced by the ControlParameter.ControlID property is located into a specific container such as ASPxPanel, ASPxFormLayout or into a template of a specific control (for example, ASPxGridView).
Solution
Make sure the ControlParameter.ControlID value equals a control’s Control.UniqueID property value.
Use the control’s Init event (How To: Use the Init/Load event handler) to find its unique ID and assign it to the ControlParameter.ControlID property.
<dx:ASPxComboBox ID="ASPxComboBox1" runat="server" DataSourceID="AccessDataSource1"
ValueType="System.Int32" ValueField="CategoryID"
TextField="CategoryName" OnInit="ASPxComboBox1_Init">
...
</dx:ASPxComboBox>