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" />

2 Answers 2

0

Please try this

PeoplePickerControlName.AllEntities.Clear();

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

0
0

Clear on the new form?

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

Maybe something like that?

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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