Welcome to Office & SharePoint Pro Sign in | Join | Help
in Search

SUBSCRIBE to Windows IT Pro Magazine & SAVE 30%      FREE Email Newsletters Vista UPDATE, Windows IT Pro UPDATE & More

Folders in a list

Last post 06-06-2007, 8:41 AM by irGerard. 0 replies.
Sort Posts: Previous Next
  •  06-06-2007, 8:41 AM 28411

    Folders in a list

    I have added a list which can contain links on a MOSS portal. This list can contain folders. How do i add items to a folder using the webservice?

    With the following i can add items to the root of the list:

    string sBatch = string.Empty;
                    sBatch = "<Method ID=\"1\" Cmd=\"New\">";
                    sBatch += "<Field Name=\"ID\">New</Field>";
                    sBatch += string.Format("<Field Name=\"Title\"><![CDATA[{0}]]></Field>", item.Title);
                    sBatch += string.Format("<Field Name=\"URL\"><![CDATA[{0}]]></Field>", item.Url);
                    sBatch += string.Format("<Field Name=\"Comments\"><![CDATA[{0}]]></Field>", item.Comments);

                    System.Xml.XmlDocument xDoc = new System.Xml.XmlDocument();
                    System.Xml.XmlElement xBatch = xDoc.CreateElement("Batch");
                    xBatch.SetAttribute("OnError", "Return");
                    xBatch.InnerXml = sBatch;

    What do i need to change/add to place a item in a (sub)folder?

    Gerard

View as RSS news feed in XML
SPONSORED LINKS FEATURED LINKS

SharePoint Security SimplifiedHaving trouble with Permissions in your SharePoint environment? Check out USPM v2007® Order Your Fundamentals CD Today!Get up to speed quickly and learn how to uncover rich information management and deployment capabilities with this free SharePoint CD. Simplify Content Migration for SharePointEase the job of SharePoint migration and ongoing site maintenance. Michael Noel outlines your migration options in this white paper. Download today! Prepare Yourself for Exchange CatastropheRead this white paper to learn how you can keep Exchange server healthy, as well as predict and respond to server failure. Featured eBook - Fundamentals of Fax Server TechnologyTake advantage of the benefits of fax servers and find out how you can implement a solution that is easy to support, secure, and integrate. Dramatically Accelerate Microsoft SharePointDeliver unimpeded access to SharePoint - Learn how to fix more than just the symptoms of slow application delivery and poor performance. Protect Your Company’s Digital AssetsDo you know the risks of sending important files over email or FTP? Read this white paper to learn what you can do to safeguard your company’s data. Boost Customer Confidence and SatisfactionRead this eBook to learn how fax servers can ease communication with less computer-savvy customers while reducing your security, compliance, and support woes. Implement a Successful Archiving SolutionView this web seminar to learn the best practices for creating an email archive that is secure, compliant, and searchable.