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
Wanting to splite the following
var options = Model.Value<IEnumerable<string>>("robotMetaTagDropdown"); foreach (var option in options) { @option }
But if I do this:
var options = Model.Value<IEnumerable<string>>("robotMetaTagDropdown").ToString().Split(",");
I get the following error:
cannot convert from 'string' to 'char'
I've been digging throug Google but with no success. Has anyone comma separated the dropdown values from backend?
If you just get rid of this it should return split values by default in your loop: .ToString().Split(",")
https://our.umbraco.com/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Dropdown/
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
Split multiple choice dropdown with comma
Wanting to splite the following
But if I do this:
I get the following error:
I've been digging throug Google but with no success. Has anyone comma separated the dropdown values from backend?
If you just get rid of this it should return split values by default in your loop: .ToString().Split(",")
https://our.umbraco.com/documentation/getting-started/backoffice/property-editors/built-in-property-editors/Dropdown/
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.