Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Joe Codino 25 posts 125 karma points
    Mar 31, 2016 @ 09:22
    Joe Codino
    0

    Empty MemberProperties on Save

    I'm using the template found in Umbraco\PartialViewMacros\Templates\EditProfile.cshtml to let members edit their properties, also the custom properties I've added to the member object. This is the code in EditProfile:

    @for (var i = 0; i < profileModel.MemberProperties.Count; i++)
     {
        @Html.LabelFor(m => profileModel.MemberProperties[i].Value, profileModel.MemberProperties[i].Name)
        @Html.EditorFor(m => profileModel.MemberProperties[i].Value)
        @Html.HiddenFor(m => profileModel.MemberProperties[i].Alias)
        <br />
     }
    

    This code correctly displays all the member properties with their values, but if I modify any of them and hit 'save', nothing happens.

    Debugging the ProfileController I've found that the ProfileModel's MemberProperties contains 0 items while saving, instead of the MemberProperties as shown in the View.

    What's wrong?

  • 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.

Please Sign in or register to post replies