Second value in dropdown list
Curious Cat
21
Reputation points
<select class="form-select" asp-for="SpareParts.Item" asp-items="@(new SelectList(Model.Stocks,"ItemCode","ItemName"))">
<option value="">select...</option>
</select>
As you can see above, there is ItemCode and ItemName between the bracelets in the SelectList. "ItemCode" as value and "ItemName" as display name.
My point is, how can I add there a second value next to "ItemCode" ?
I did try it with comma to seperate it but EF didn't allow me that.
With other words;
I need also the "ItemName" as value with the "Itemcode" together. I will split them at code-behind side.
Thank you in advance.