Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a .Net user control that creates nodes dynamically and pops them under a selected parent node. The code is below.
I want to assign values to the three properties of my created node, but can't seem to hit on the right syntax. Can anyone help? I'm writing in C#
//create node string strDocumentName = DateTime.Now.ToString("yyyy_MM_dd_HH_mm_ss_ffffff"); DocumentType dt = DocumentType.GetByAlias("Comment"); //author uses a dummy user called CommentWriterUser author = User.GetUser(2); Document doc = Document.MakeNew(strDocumentName, dt, author, _intParentId);//add properties??doc.Publish(author);umbraco.library.UpdateDocumentCache(doc.Id);
Hi,
This should work:
doc.getProperty("property_alias_in_here").Value = "Your value";
T
Thanks Tim!
Glad I could hep!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
assigning values to node properties dynamically.
I have a .Net user control that creates nodes dynamically and pops them under a selected parent node. The code is below.
I want to assign values to the three properties of my created node, but can't seem to hit on the right syntax. Can anyone help? I'm writing in C#
Hi,
This should work:
doc.getProperty("property_alias_in_here").Value = "Your value";T
Thanks Tim!
Glad I could hep!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.