简体   繁体   English

从人员编辑器SharePoint控件中清除值

[英]Clear values from people editor SharePoint control

I have a PeopleEditor control on my page. 我的页面上有一个PeopleEditor控件。 User can add users to people picker and I have a button that sends some sort of email to to those users. 用户可以将用户添加到人员选择器,我有一个按钮,可以向这些用户发送某种电子邮件。 However, the values in the People picker value remains even after the postback. 但是,即使回发后,“人员”选择器值中的值仍然保留。

Does anyone knows how to clear the fields programmatically? 有谁知道如何以编程方式清除字段?

I have tried this but didn't do anything: http://jyothsnag.blogspot.com/2011/04/clearing-people-picker-control.html 我已经尝试过了,但是什么也没做: http : //jyothsnag.blogspot.com/2011/04/clearing-people-picker-control.html

Any help would be greatly appreciated. 任何帮助将不胜感激。

Have you tried this? 你有尝试过吗? PeopleEditor.CommaSeparatedAccounts = null PeopleEditor.CommaSeparatedAccounts = null

you can give a try to PeopleEditor.ResolvedEntities.Clear(); 您可以尝试使用PeopleEditor.ResolvedEntities.Clear(); works on fly. 在飞行中工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM