Listbox item shifting + Invalid postback or callback argument
<p>I have a listbox which has 2 buttons to shift the items in it up and down. If the items are binded before hand, it will be fine if I shift their position and save it to my database but if I were to add in a new item from a textbox --> shift its position either up or down --> save my form, I will get an error as shown below, please kindly advice, I do not want to turn off an security features. Thanks:</p>

<p>This is my up shifting code in JS:</p>

<pre><code>        function moveUp() {

            // get the list box
            var lb = document.getElementById("&lt;%=uilstMemTypeTier.ClientID%&gt;");

            // if there are less than 2 items ignore it
            if (lb.length &lt; 2) return false;

            // if the first item is selected it means that it cannot move up anymore so ignore it
            if (lb.options[0].selected) return false;

            var tempOpt;
            for (i = 1; i &lt; lb.length; i++) {
                if (lb.options[i].selected) {
                    // remove the previous option and put it in a temp var
                    tempOpt = new Option(lb.options[i - 1].value, lb.options[i - 1].value);
                    // push the current one back one
                    lb.options[i - 1] = new Option(lb.options[i].value, lb.options[i].value);
                    lb.options[i - 1].selected = true;
                    // push the previous one into the current space
                    lb.options[i] = tempOpt;
                }
            }

            repopulateHiddenFieldDefaultsFromListBox();
            repopulateHiddenFieldListItemsFromListBox();
        }

         function repopulateHiddenFieldDefaultsFromListBox() {
            // get the list box
            var lb = document.getElementById("&lt;%=uilstMemTypeTier.ClientID%&gt;");

            // get the hidden field
            var hf = document.getElementById("&lt;%=hf_listBasedFields_defaultItems.ClientID%&gt;");

            for (i = 0; i &lt; lb.length; i++) {
                if (lb.options[i].selected) hf.value += lb.options[i].value + delim;
            }
        }

        function repopulateHiddenFieldListItemsFromListBox() {
            // get the list box
            var lb = document.getElementById("&lt;%=uilstMemTypeTier.ClientID%&gt;");

            // get the hidden field
            var hf = document.getElementById("&lt;%=uihdnlistBasedFieldsListItems.ClientID%&gt;");

            // loop thru the list box and repopulate the hf
            hf.value = "";
            for (i = 0; i &lt; lb.length; i++) hf.value += lb.options[i].value + delim;
        }
</code></pre>

<p><strong>Error message:</strong></p>

<p>Invalid postback or callback argument.  Event validation is enabled using  in configuration or &lt;%@ 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.</p>
