This is what I have tried so far:

            string newPageXml = String.Format(@"<Batch OnError='Continue'>
                                    <Method ID='1' Cmd='New'>
                                        <Field Name='ID'>New</Field>
                                        <Field Name='ContentType'>MNC Site Page</Field>
                                        <Field Name='Title'>{0}</Field>
                                        <Field Name='BaseName'>{0}</Field>
                                        <Field Name='PublishingPageContent'>{1}</Field>
                                </Batch>", "Friday Memo for " + nextFriday.ToShortDateString(), newPageContent);

            xd = new XmlDocument();
            newItem = xd.DocumentElement;
            createdItem = ceoList.UpdateListItems("Pages", newItem);

This code create an item in my list, but the item uses the default content type instead of the one I have specified in my XML. Is there a way to do what I am trying above?

1 Answer 1


I see this is a bit of an old question, but it is unanswered so I'll try to offer a possible solution...

You can try to add ContentTypeId field together with ContentType. Does it work now?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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