Copied to clipboard

Flag this post as spam?

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


  • Max 144 posts 166 karma points
    May 30, 2011 @ 08:49
    Max
    0

    Dcocument.Copy() not working

    I have created a .net user control that will copy that document programatically to another website for multilingual site i have two seperate nodes of the same website project

    now is the user creates a document it must be programtically allowed to be copied by a button click and here is my code i cant get it to work

     

     

     

     

     

     

     

    Document childDoc = new Document(Convert.ToInt32(Request.QueryString["id"

    ]));

    childDoc.Copy(childDoc.Parent.Id, author,

     

    true

    );

     

    foreach (Relation r in Relation

    .GetRelationsAsList(childDoc.Id))

    {

     

    Document newDoc = new Document

    (r.Child.Id);

     

    int

    idd = newDoc.Id;

    newDoc.Text = childDoc.Text;

     

    newDoc.Publish(author);

    umbraco.

     

    library

    .UpdateDocumentCache(newDoc.Id);

Please Sign in or register to post replies

Write your reply to:

Draft