Searching...
Jumat, 17 Juni 2016

Error "String was not recognized as a valid Boolean" at PeopleEditor AKA PeoplePicker in custom layout pages Sharepoint 2010

If you are using PeopleEditor AKA PeoplePicker in custom layout pages and have installed SharePoint 2010 SP1 and the June 2011 CU you may experience problems if your application page performs a postback.
If you have filled your people editor control with a value before a postback is triggered, it will stop functioning as an actual picker and if you perform another postback on the page you will get an errormessage: “String was not recognized as a valid Boolean”.
The reason seems to be that a lot of span tags are not regenerated after the first postback.
The only descent fix so far seems to be to validate the PeopleEditor control in the page OnLoad event:


  1. protected override void OnLoad(EventArgs e)

  1. {
  2.     base.OnLoad(e);
  3.     if (IsPostBack)
  4.     {
  5.         yourPeopleEditor.Validate();
  6.     }
  7. }

Source:ogarshol.blogspot.com

0 komentar:

Posting Komentar