Hello,I have two list boxes (radFullList and radList) which are linked together for AllowTransfer. Not that it matters but the first listbox is a list of employee names, the value is their employee number. The second listbox is for holding the employee's supervisors so when you move an items from radFullList to radList it maintains the same format, employee name and employee number in the value.
I have this wired up to a Save button in my Sitefinity Module.
So as you can see all I am doing is a simple write from the form.
Scenario: This code works perfectly if the second listbox (radList) is empty. You add 1 or 2 employees to the second list box, hit save and the results written to the database are accurate.
If you go back in to this employee's account, you will see everything is correct. Instead of exiting, if you simply hit Save again all the entries in the second listbox, radList, are duplicated. Both times the same code is used since I am "Updating" the employee both times.
As a test to get screens for this post I edited an employee who has no supervisors. Which you can see in screenshot "001.png". Screenshot "002.png" is after adding two accounts as supervisors. The screenshot is taken after Save is clicked which means not only did it save to the database correctly, but it was loaded into the listbox correctly as well. Now in screenshot "003.png" is after clicking the Save button once more without performing any work with the listboxes. As you can see the two entries are repeated.
As far as I can tell from looking up documentation associated with RadListBox I am using the correct code to cycle through items. "