Hi,
I am using this code:
// Create an instance of the Tree provider first
TreeProvider tree = new TreeProvider(CMSContext.CurrentUser);
// get the node for testing purposue directly by it's node ID
TreeNode node = tree.SelectSingleNode(1163);
if (node != null)
{
// Change coupled data
node.SetValue("NewsTitle", "Title changed from code");
node.SetValue("MediaSelectorColumn", "~/CorporateSite/media/Gallery/document.pdf&ext=.pdf");
// Save to database
node.Update();
}
And it is working just fine and given value is saved and the file is accessible.
Best regards,
Juraj Ondrus