Copied to clipboard

Flag this post as spam?

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


  • Diego 22 posts 153 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

Please Sign in or register to post replies

Write your reply to:

Draft