L
laura@refactoredmedia.com
Guest
The code sample below is the way to set the values. For persisting the values in the database, it is needed to save the changes by using the UserProfileManager: UserProfileManager profileManager = UserProfileManager.GetManager(); ....... profile.SetValue("Checkboxes", new string[] { "Option2" } ); ...... profileManager.SaveChanges(); However, it is a good practice to execute the logic in the controller and keep the view only for displaying the value. Here is a code sample to display the custom field values in the view after they have been set: @foreach (var choice in Model.Item.Fields.Choices) //Choices is a custom ChoiceField added to a content type { @choice.Text.ToString() : @choice.PersistedValue.ToString() } For more details, please check this KB article - knowledgebase.progress.com/.../mvc-how-to-display-custom-choicefield-s-selected-choices-using-razor
Continue reading...
Continue reading...