Please let me know how to use calendar and people picker in my web part user control code
-
Monday, April 30, 2012 11:27 AM
Please can someone help in getting the below url code or some other simple links -
http://www.codeproject.com/Articles/26626/Use-SharePoint-User-or-Group-Picker-in-your-WebPar
http://www.codeproject.com/Articles/21930/Date-Picker-User-Control
Please help me
Thanks in advance.
sudhanshu sharma Do good and cast it into river :)
All Replies
-
Wednesday, May 02, 2012 8:28 AMModeratorHi sudhanshuSharma,
Your above links have been very detailed, here are some additional:
1、To add the normal people picker to a web part you can use Microsoft.SharePoint.UserControls.PeopleEditor
<SharePoint:PeopleEditor ID="myPeoplePicker" runat="server" Width="300" BorderStyle="Solid" BorderColor="Black" BorderWidth="1" />
2、Here is an article about how to use Sharepoint default Datetimecontrol picker for custom application built in VS for Sharepoint 2007:
http://www.c-sharpcorner.com/uploadfile/Ravish001/how-to-use-sharepoint-default-datetimecontrol-picker-for-custom-application-built-in-vs-for-sharepoi/
Thanks,
Lhan Han
- Edited by Lhan HanModerator Wednesday, May 02, 2012 8:30 AM
- Marked As Answer by Lhan HanModerator Thursday, May 03, 2012 1:33 AM
- Unmarked As Answer by sudhanshuSharma Thursday, May 03, 2012 4:02 AM
-
Thursday, May 03, 2012 4:06 AM
Hi Lhan,
Datepicker has done but i m not able to create people picker...
found this site -
http://karinebosch.wordpress.com/sharepoint-controls/peopleeditor-control/
But not getting what to write in user control web part to achieve people picker like sharepoint.
I write 2 things in ascx file
<%@ Register TagPrefix="spuc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <div> <spuc:PeopleEditor ID="PeopleEditor1" runat="server" width="350px" AllowEmpty="true" MultiSelect="false" SelectionSet="User" /> </div> But when i saw in design mode then getting error in creating control 'user' could not be set property Selection Set.
sudhanshu sharma Do good and cast it into river :)- Edited by sudhanshuSharma Thursday, May 03, 2012 4:19 AM
-
Thursday, May 03, 2012 5:12 AMModerator
Hi sudhanshuSharma,
You need add a reference to Microsoft.SharePoint.dll ,Please referring to the following link, and do it according to its description:
http://blogs.msdn.com/b/ekraus/archive/2008/02/06/use-peopleeditor-people-picker-in-sharepoint-custom-app-dev.aspx
If you still got error in design mode, you can skip it, and publish your webpart to your site, check if ok.
Thanks,
Lhan Han- Marked As Answer by sudhanshuSharma Thursday, May 03, 2012 8:46 AM
-
Thursday, May 03, 2012 8:47 AM
Lhan Thank:) for help although error was still thr in design mode but i am able to see people picker on web :)
sudhanshu sharma Do good and cast it into river :)

