People picker control implementation in asp.net mvc application

青春壹個敷衍的年華 提交于 2019-12-24 02:09:28

问题


I want to include the Sharepoint people picker control type in my application, My app is developed in asp.net MVC. is there a way so that i can include the GAL feature in my asp.net application. This should work even if the outlook is not installed in user pc.


回答1:


Taken from this page dated March 1 2013

"SP controls can only be used on SP hosted pages. Currently the only control designed from the ground up to be consumed on all page types (provider-hosted, auto-hosted or sp hosted) is the chrome control."

and another post from an MSFT

"I've consulted with several colleagues and the consensus seems to be that SharePoint's client side people picker, which is JavaScript, cannot be used in a provider-hosted app. The reason is that there's no way to get a client context on a remote web page. You mention the TokenHelper.cs which is managed code, not JavaScript. I have a question pending with the product team to see if there's anyway to get the context with managed code and pass it to JavaScript. I didn't want you to have to wait any longer for an answer."




回答2:


I would suggest writing a plugin. (Although I have never had the requirement to implement it YET)

How :

you write a controller that loads users from AD, and then send a JSON object of these to your client via AJAX and then use jquery auto complete to filter names as the user types.

Or

Simulate the "check User " button by making AJAX calls to that controller and check if name exist on click of that button. then write appropriate error messages if false.

I would still be on the lookout for other solutions though



来源:https://stackoverflow.com/questions/21701488/people-picker-control-implementation-in-asp-net-mvc-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!