I get an ClientScriptManager.RegisterForEventValidation error when I use dhtmlxcombo with c#. I use the loadxml with a drop downlist function to set the drop down list options. but when I select a value i get an error that says to set EnableEventValidation=“false”. And no values are in the dropdownlist selected item. I even registered the script :
<asp:DropDownList ID=“drpInvLname” runat=“server” AutoPostBack=“true” OnSelectedIndexChanged=“LastName_Change” Width=“200px”></asp:DropDownList>
<asp:RequiredFieldValidator ID=“rfvInvLname” runat=“server” ErrorMessage=“Last Name Required” InitialValue="-1" ControlToValidate=“drpInvLname”></asp:RequiredFieldValidator>
When select box converted to the combo, it creates two input fileds ( one has the same name as combo, second one shows is provided value was selected from the list , or it is a new text. )
The .Net code throws error because count of parameters returned from client differs from expected one. You may disable such check in asp code , or update dhtmlxcombo in next way
locate
self.DOMelem.appendChild(z);
self.DOMelem_hidden_input2 = z;
and comment first line
// self.DOMelem.appendChild(z);
self.DOMelem_hidden_input2 = z;