I have a PeopleEditor
in my ASPX page:
<SharePoint:PeopleEditor ID="ccAuthor" runat="server" SelectionSet="User" MaximumEntities="1" />
And access its contents when the corresponding save button is clicked:
<asp:LinkButton ID="lnkUpdateCcAuthor" runat="server"
OnCommand="LinkPostbackCommand"
CommandName="UpdateCcAuthor" CommandArgument="">
<asp:Image ID="imgCcAuthor" runat="server" ImageUrl="/_layouts/images/save.gif"
style="border-width: 0px;" AlternateText="Update CC-Author for selected Task" />
</asp:LinkButton>
This works fine when adding people, but I cannot remove them.
This code
string[] accounts = editor_.CommaSeparatedAccounts.Split(',');
Executed upon the PostBack of the Update
button always contains the account that was in the PeopleEditor
initially, although the form control is empty when I click Update
.
What is going on here? Why can't I remove the account?