using System;Articles:
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using System.Web.UI.WebControls;
namespace PeoplePickerWebPart
{
public class TeamMemberPicker : System.Web.UI.WebControls.WebParts.WebPart
{
protected override void CreateChildControls()
{
try
{
PeopleEditor PeoplePickerControl = new PeopleEditor();
PeoplePickerControl.AllowEmpty = true;
PeoplePickerControl.AllowTypeIn = true;
PeoplePickerControl.BrowseButtonImageName = "browse";
PeoplePickerControl.BrowseButtonToolTip = "Pick an TeamMember";
PeoplePickerControl.CheckButtonImageName = "Validate user";
PeoplePickerControl.ErrorMessage = "No TeamMember Found";
this.Controls.Add(PeoplePickerControl);
base.CreateChildControls();
}
catch (Exception ex)
{
Literal _ErrorMessageLiteral = new Literal();
_ErrorMessageLiteral.Text = "Custom Error: " + ex.Message;
this.Controls.Clear();
this.Controls.Add(_ErrorMessageLiteral);
}
}
}
}
http://dotnet.org.za/zlatan/archive/2008/04/21/using-peopleeditor-control-with-web-parts-in-sharepoint-2007-wss-3-0.aspx
2 comments:
Sandeep,
With following statements in the your code, showing the browken image links of check names and browse images:
PeoplePickerControl.BrowseButtonImageName = "browse";
PeoplePickerControl.CheckButtonImageName = "Validate user";
Were you able to see normla text links in the place of image links?
Please let me know if anything need to be changed.
Yes it does work .. Also checkout the article with the bog.. that might help
Post a Comment