Copied to clipboard

Flag this post as spam?

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


  • Diego 25 posts 156 karma points
    Aug 23, 2023 @ 15:57
    Diego
    0

    Html.DropDownListFor binding

    Hello, is it possible to bind the DropdownListFor with a property of a instance about RegisterModel, that is not part of the Model?

    For exemple:

    @Html.DropDownListFor(x => registerModel.Property[i].Value,
    new SelectList(ListItem, "Value", "Text"),
    "Select...",)
    

    I correctly display the list in the front-end, but the selected value does not go into binding. How come?

    Thanks

  • 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