0

Because of some c# wierdness due to the fact that I extended a class I cannot simply set the value of a dropdown like normal:

@Html.DropDownListFor(c => @Model.IssueSelected, Model.IssueList)

I need to set each property. How can I write the linq expression to set multiple things eg Text and Value and CardColor (part of extended class). I guessed at this syntax but it is obviously wrong:

@Html.DropDownListFor(c => {@Model.IssueSelected.CardColor,@Model.IssueSelected.Text}, Model.IssueList)
Rilcon42
  • 9,584
  • 18
  • 83
  • 167

0 Answers0