people picker in sharepoint hosted APP with MVC

i am developing SharePoint hosted  app with  MVC and back-end SQL Data and i want to add people picker in MVC page and need to update that value to sql database using model view control


  • Edited by Veeresh I Monday, June 22, 2015 4:08 PM
June 18th, 2015 3:02pm

Hi,

In SharePoint 2013, SharePoint hosted app can't include code behind solution, if you want to include MVC solution in app, you need to use SharePoint Provider hosted app.

More information about the difference of this two type apps, you can refer the articles below:

Choose patterns for developing and hosting your app for SharePoint

Use People Picker in Provider hosted app:

Use the experimental People Picker widget in apps for SharePoint

About including MVC solution in SharePoint Provider hosted app, you can refer the detailed blog:

ASP.NET MVC based Apps for SharePoint 2013 (on-premises)

For adding People Picker in MVC page and update value to SQL database, as this is more related to MVC development, I suggest you can create a thread in MVC forum, you will get more help from there.

MVC Forum

Thanks for your understanding

Best R

Free Windows Admin Tool Kit Click here and download it now
June 19th, 2015 3:17am

this is not correct answer and  i am strongly disagree pointing to its MVC thread..

i want to use SharePoint user control in Provider hosted app then on submit (httppost) need to get ADid of user from sharepoint user control and then assign that value to model property to update into sql server

basically i am looking to add SharePoint user control in MVC page(sharepoint hosted app)

then get AD id of user on selection 

assign that value to model property to get inserted into sql databse


  • Edited by Veeresh I Friday, June 19, 2015 1:05 PM
June 19th, 2015 1:04pm

Hi Veeresh,

I'm a bit confused - is it SharePoint Hosted or Provider hosted? MVC is not supported in SharePoint hosted app but only in provider hosted app? If it's SharePoint hosted (running inside sharepoint as subsite) then please look at https://msdn.microsoft.com/en-us/library/office/jj713593.aspx.

If it's provider hosted (which means a separate MVC application) then you can try the people picker widget (https://msdn.microsoft.com/en-us/library/office/dn636915.aspx) though it's still in experimental period.

Free Windows Admin Tool Kit Click here and download it now
June 20th, 2015 2:35am

Hi Veeresh,

To understand simply, SharePoint hosted app  can only be created through HTML 5, JS,CSS, other javascript framework and REST API.

If you wanted to use the ASP.NET or PHP and etc language then you have to choose the Provider hosted app.

You may try this for SharePoint hosted app to get the People Picker control,

Multiple People Picker through Angular JS and If you can also create through REST API, Check this

For Provider hosted app

https://msdn.microsoft.com/en-us/library/office/dn636915.aspx
http://blogs.msdn.com/b/officeapps/archive/2014/03/06/uservoice-your-feedback-in-our-products.aspx

June 20th, 2015 3:34am

yes i know , its not sharepoint hosted app..its provider hosted app
Free Windows Admin Tool Kit Click here and download it now
June 22nd, 2015 8:54am

i am able to mange add people picker :

https://msdn.microsoft.com/en-us/library/office/dn636915.aspx?f=255&MSPPError=-2147217396 

  • Marked as answer by Veeresh I 15 hours 58 minutes ago
July 3rd, 2015 11:42am

i am able to mange add people picker :

https://msdn.microsoft.com/en-us/library/office/dn636915.aspx?f=255&MSPPError=-2147217396 

  • Marked as answer by Veeresh I Friday, July 03, 2015 3:39 PM
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2015 3:39pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics