add

Wednesday, May 20, 2009

How to check if PeopleEditor is blank ?

Sometimes, we need to check whether Sharepoint PeopleEditor is blank or not. We can do that very easily by accessing Length property of that control.

Suppose we have a PeopleEditor control with Id PE1 then check for the lenght like this:

Int32 intLength = PE1.CommaSeparatedAccounts.Length;

Then put your own business logic as :

if (intLength == 0)
{.... }

No comments: