Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Yuval Lombard 14 posts 44 karma points
    Dec 01, 2013 @ 08:59
    Yuval Lombard
    0

    Creating a Document/Node in Web Forms User Controls Umbraco 6.1.6 API

    Hi guys!

    I'm having troubles creating a Document/Node via Umbraco 6.1.6 API I'm currently using User Controls in a Web Forms project, and this is the code im using:

    DocumentType dt = DocumentType.GetByAlias("uBlogsyComment");

    User author = User.GetUser(0);

    Document doc = Document.MakeNew("My new document", dt, author,

    if(toPublish) doc.Publish(author);

    Would love to get some help with it

    tnx!

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Dec 01, 2013 @ 14:55
    Ali Sheikh Taheri
    0

    Hi Yuval,

    I would recommend you to use the new API as you are using Umbraco 6.

    here is a great article about it and it explains how you can create new content(node).

    Cheers

    Ali

Please Sign in or register to post replies

Write your reply to:

Draft