Skip to content

Data List: Set value programmatically #129

Closed Answered by leekelleher
jpabdilla-gfi asked this question in Question
Discussion options

You must be logged in to vote

@jpabdilla-gfi Yes, it's possible.

The approach would be similar to the example in the Umbraco documentation. Except the values would need to be the UDI of the content items, e.g.

content.SetValue("superHeros", JsonConvert.SerializeObject(new[] { "umb://document/4fed18d8c5e34d5e88cfff3a5b457bf2", "umb://document/4fed18d8c5e34d5e88cfff3a5b457bf2" }));

Hope this helps?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jpabdilla-gfi
Comment options

Answer selected by leekelleher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants