Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

HI please help me to write custom code to create a custom page using following method.

please let me know how can i use the custom control(I mean the SharePoint User Picker control). Are there any controls available in SharePoint Visual Studio 2010 Kit.

if (SPContext.Current.FormContext.FormMode == SPControlMode.Edit)
{
    TextField txtField = new TextField();
    txtField.ID = "FieldControlID";
    txtField.FieldName = "FieldControlFieldName";

    DateTimeField dateField = new DateTimeField();
    dateField.ID = "FieldControlID";
    dateField.FieldName = "FieldControlFieldName";

    DropDownChoiceField ddField = new DropDownChoiceField();
    ddField.ID = "FieldControlID";
    ddField.FieldName = "FieldControlFieldName";

    this.Controls.Add(txtField);
    this.Controls.Add(dateField);
    this.Controls.Add(ddField);
}

example code above please provide me a full link if some one implement the CURD.

share|improve this question
3  
People that have downvoted havent left a comment (they really should!), so let me elaborate a bit on what to expect from our site: you should not expect people to do your job for you. In other words we are glad to give you a nudge in the right direction and assist you in specific problems you might have with SharePoint. However dont expect full code samples ready to insert in your code, so you can call your boss and say "finished" :-) –  Anders Rask Jun 14 '11 at 7:09
    
Also please ensure you tag correctly and make sure your questions are easily readable and understandable. –  Alex Angas Jun 20 '11 at 9:19
    
@Alex I will take care of it next time. –  Basant B. Pandey Jun 20 '11 at 14:22

1 Answer 1

Sounds like you want the PeopleEditor control. If you google around, you'll see some examples of it in use in an aspx page, but the principles are the same, it's just a .NET control.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.