SaaS CMS has officially launched! Learn more now.

Setting value of [SelectMany] property programmatically


I've a string property on my Page with the [SelectMany] attribute, and I need to create the page and fill the property programmatically. 

    [SelectMany(SelectionFactoryType = typeof(MyItemsSelectionFactory))]
    public virtual string MyItems { get; set; }

at the moment I'm using the following for setting the value of [SelectOne] properties...

    myObj.MyItem = "99" // where 99 == ContentReference.ID of target page

which works ok, but how do i set multiple values at once?


Feb 13, 2020 9:46

I believe you can join the values with a colon, for example, "99,100,101"

Feb 13, 2020 9:58

Thank you, working for me now.

Feb 13, 2020 12:25
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.