1

I transferred the C# code from an application page (SharePoint 2010) to an identical application in C# under SharePoint 2013. Issue: the peopleeditor is blank but has a value behind.

peopleeditor.CommaSeparatedAccount = SPContext.Current.Web.CurrentUser.LoginName;
peopleeditor.Validate();

After the above code I don't see anything in the peopleeditor "text box". I created a new textbox below - the next code however shows me that the value is there but is not visible:

txtValue.Text = peopleeditor.CommaSeparatedAccount; //I can see the value here.

Also what is strange is that the "Check Names" button located on the right side of the peopleeditor doesn't validate anymore the value in the "text box". Also the "Browse" button on the right side of the peopleeditor doesn't work properly anymore (it allows me to find the correct person but when I double-click on it the value is not transferred to the peopleeditor "text box").

I tried everything ... I'm out of ideas :(

3
  • Hi - I have edited your question for readability purpose (mainly code formatting). As you can see I also added both the people-picker and the clientpeoplepicker tags, the first referring to the old pre 2013 version of the picker and the later to the new one. Can you please specify which version you are using in the migrated page? I think your issue may be related.
    – SPArcheon
    Oct 20, 2016 at 15:44
  • I use Visual Studio 2012, I created the blank SharePoint 2013 project, I added the "_Layout" folder to the project. Afterwards I added the blank application pages and I copied and pasted from SharePoint 2010 application pages the content in "PageHead" and "Main" (for the design") and the code in the code behind. This approach is a bit time consuming but the result is cleaner than converting the Visual Studio 2010 project to Visual Studio 2013 project using the wizard.
    – Nman
    Oct 20, 2016 at 16:39
  • so the picker should still be the 2010 version one. There are multiple reference to similar problems (empty picker with values available in code-behind) even on stack, but I didn't find a silver bullet answer. Either it is a missing script or something similar. I would suggest you try to switch to the new clientpeoplepicker and see if that makes any difference
    – SPArcheon
    Oct 21, 2016 at 15:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.