I have a sharepoint webpart and I use below controls:
<asp:DropDownList runat="server" ID="ddlCategory">
</asp:DropDownList>
<asp:ListBox runat="server" ID="ddlHSESubCategory" SelectionMode="Multiple">
</asp:ListBox>
I will be setting options later using jquery ajax call. when page is post back, I get below error:
Event validation is enabled using <pages enableEventValidation="true"/>
in configuration or <%@ Page EnableEventValidation="true" %> in a page.
Since I am building webpart, I can not set enableEventValidation=false since I do not have access to pages directive, and this webpart can be inserted to any page.
how do I overcome this ?