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
Basically it only ever returns the first group picked as a single string.
So I do the below and I only ever get the first result.
Anybody had similar or any solutions?
This works for me - any use??!
Layout = "master.cshtml";
var memberGroupStrs = Model.Content.GetPropertyValue<string>("memberGroup").Split(',');
foreach (var curMemberGroupStr in memberGroupStrs)
var memberGroup = ApplicationContext.Current.Services.MemberGroupService.GetByName(curMemberGroupStr);
if (memberGroup != null)
<h3>@curMemberGroupStr - @memberGroup.Id - @memberGroup.Name</h3>
If you just need the group name don't bother with the service (as it might be hitting the DB to do the getbyname.
Thanks for the reply Steve, but the property on the object itself is only returning the first of the selected member groups.
So for example I have a node that is limited to financial and testing in the property limitToGroups.
When I hit the code below:
var memberGroupStrs = Model.Content.GetPropertyValue<string>("limitToGroups")
memberGroupStrs is only equal to whichever group I selected first.
So if financial was the first group selected on the memberGroup Picker but testing was also selected on it, memberGroupStrs would only be equal to "financial".
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted