1

Please tell me how to clear the value "ClientPeoplePicker" in C#?

<SharePoint:ClientPeoplePicker runat="server" ID="PeoplePickerControlName" Required="true" ValidationEnabled="true" InitialHelpText="text" VisibleSuggestions="3" Rows="1" AllowMultipleEntities="false" CssClass="ms-long ms-spellcheck-true" />
1

Please try this

PeoplePickerControlName.AllEntities.Clear();

Link about this: https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.webcontrols.clientpeoplepicker.allentities.aspx

0

Clear on the new form?

$('[id^=ClientPeoplePicker]').val('');

Maybe something like that?

  • Not JS, in C#... – Fox Apr 19 '18 at 8:02
  • Sorry bout that. picker.Accounts.Clear(); picker.Entities.Clear(); picker.ResolvedEntities.Clear(); – Jaitsujin Apr 19 '18 at 23:54
  • Your code actually is peopleeditor, not clientpeoplepicker – Fox Apr 21 '18 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.