C# How to clear <SharePoint:ClientPeoplePicker>
-
15-01-2021 - |
Question
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" />
Solution
Please try this
PeoplePickerControlName.AllEntities.Clear();
Link about this: https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.webcontrols.clientpeoplepicker.allentities.aspx
OTHER TIPS
Clear on the new form?
$('[id^=ClientPeoplePicker]').val('');
Maybe something like that?
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange