Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: Save to default program files folder Pin
Jon Henry21-May-09 13:00
Jon Henry21-May-09 13:00 
GeneralRe: Save to default program files folder Pin
Luc Pattyn21-May-09 13:35
sitebuilderLuc Pattyn21-May-09 13:35 
QuestionCurious question as I am c# developer. [modified] Pin
Blubbo21-May-09 2:23
Blubbo21-May-09 2:23 
AnswerRe: Curious question as I am c# developer. Pin
musefan21-May-09 2:33
musefan21-May-09 2:33 
AnswerRe: Curious question as I am c# developer. Pin
EliottA21-May-09 3:01
EliottA21-May-09 3:01 
JokeRe: Curious question as I am c# developer. Pin
Manas Bhardwaj21-May-09 4:02
professionalManas Bhardwaj21-May-09 4:02 
GeneralRe: Curious question as I am c# developer. Pin
PIEBALDconsult21-May-09 5:20
mvePIEBALDconsult21-May-09 5:20 
QuestionUsing UserFields and Date Fields in Web Parts Pin
lday8621-May-09 2:22
lday8621-May-09 2:22 
Hi,

I am creating a web part for Microsoft SharePoint and i need to add two controls, a userfield (to allow a user to be selected) and a date picker field. So far i have the following code:

protected override void CreateChildControls()
        {
            btnSubmit = new Button();
            btnSubmit.Text = "Add to list";
            btnSubmit.Click += new EventHandler(btnSubmit_Click);
            Controls.Add(btnSubmit);

            txtTitle = new TextBox();
            Controls.Add(txtTitle);

            dateDueDate = new DateTimeControl();
            Controls.Add(dateDueDate);

            userAssignedTo = new UserField();
            Controls.Add(userAssignedTo);

            base.CreateChildControls();
        }


        protected override void RenderContents(HtmlTextWriter writer)
        {
            //RENDER CONTENTS
            btnSubmit.RenderControl(writer);
            writer.Write("<br />");
            txtTitle.RenderControl(writer);
            writer.Write("<br />");
            dateDueDate.RenderControl(writer);
            writer.Write("<br />");
            userAssignedTo.RenderControl(writer);
            writer.Write("<br /><br />");


However, the UserField and DateTimecontrol are causing the web part not to render. I am not sure if i am using the correct field types or adding them correctly.

Any help would be great,
Thanks in advance
QuestionCombining default xml serialization and custom xml serialization. Pin
rahulvb2821-May-09 2:03
rahulvb2821-May-09 2:03 
QuestionCrysatal Report Problem Pin
Mogaambo21-May-09 1:48
Mogaambo21-May-09 1:48 
QuestionRegion based shape representation Pin
raouaa21-May-09 1:15
raouaa21-May-09 1:15 
AnswerRe: Region based shape representation Pin
Henry Minute21-May-09 1:50
Henry Minute21-May-09 1:50 
QuestionReturning Field Names in SharePoint Pin
lday8621-May-09 1:04
lday8621-May-09 1:04 
GeneralGantt chart control Pin
hairy_hats21-May-09 0:48
hairy_hats21-May-09 0:48 
GeneralRe: Gantt chart control Pin
musefan21-May-09 1:06
musefan21-May-09 1:06 
GeneralRe: Gantt chart control Pin
hairy_hats21-May-09 1:22
hairy_hats21-May-09 1:22 
GeneralRe: Gantt chart control Pin
musefan21-May-09 1:25
musefan21-May-09 1:25 
GeneralRe: Gantt chart control Pin
hairy_hats21-May-09 1:33
hairy_hats21-May-09 1:33 
GeneralRe: Gantt chart control Pin
musefan21-May-09 1:41
musefan21-May-09 1:41 
QuestionWord automation using C# Pin
Niks775521-May-09 0:32
Niks775521-May-09 0:32 
AnswerRe: Word automation using C# Pin
musefan21-May-09 0:46
musefan21-May-09 0:46 
GeneralRe: Word automation using C# Pin
Niks775521-May-09 1:23
Niks775521-May-09 1:23 
GeneralRe: Word automation using C# Pin
musefan21-May-09 1:31
musefan21-May-09 1:31 
GeneralRe: Word automation using C# Pin
Niks775521-May-09 19:39
Niks775521-May-09 19:39 
AnswerRe: Word automation using C# Pin
Pete O'Hanlon21-May-09 1:50
mvePete O'Hanlon21-May-09 1:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.