Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 3
    In 1.0.0-rc1-update1 the above code simply prints "BookingCode" text instead of the actual value of the BookingCode property. Any other solutions? Commented Apr 27, 2016 at 20:12
  • 2
    Since this is for a label element the asp-for defaults to the property name and not the value of BookingCode. Use @item.BookingCode with no element to see the value. Commented Jun 4, 2016 at 8:57
  • Tag helper for <label> will not be that important here. But if you wan to use it, as @JoelCunningham stated, use <label asp-for="@item.BookingCode">@item.BookingCode</label> asp-for value will display the heading as a property name and @item.BookingCode inside <label ...>...</label> will display the value of @item.BookingCode. Commented Jul 6, 2016 at 19:06