String was not recognized as a valid Boolean at PeopleEditor or EntityEditor of SharePoint 2010

Creating a new web part for SharePoint 2010 and always have problem  “String was not recognized as a valid Boolean” when some control inside do a post back.

A lot articles on the internet that said we need to patch SharePoint with June CU 2011. But if you still having error experience even already installed the patch so this a code below you can put in on your webpart.

protected override void OnLoad(EventArgs e){

base.OnLoad(e);
if (IsPostBack)
{
yourPeopleEditor.Validate();
}
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.