Hello Guys,
precondition:
1. i have 2 listbox 1-that contains all items (from database) and the other one contains the selected item (blank)
2. lstAllItems.DataSource = myDataSomething;
3. lstSelectedItem -> not populated
4. i have client side control btnMove that will copy the selected item from lstAllItems listbox and copy it to the lstSelectedItem. The code responsible for this is a client side code (javascript)
5. then click save button
I have 2 error encountered during saving:
1. If EnableEventValidation is on in <%@ Page ...%> I am getting this error:
Exception type: ArgumentException
Exception message: Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
2. If turned off the EnableEventValidation and when i click save button the lstSelectedItem listbox (though it was populated using javascript) but when i count the items like lstSelectedItem.Items.Count the result is zero.
Question:I read couple of articles stating to use GetPostBackEventReference method but still the issue is still there.