Skip to content

Confusing example of DisplayFor. #22000

Closed

Description

@LeTranAnhVu

[Enter feedback here]
I found the unclear code in https://docs.microsoft.com/en-us/aspnet/core/tutorials/razor-pages/page?view=aspnetcore-5.0&tabs=visual-studio#the-create-delete-details-and-edit-pages

In the above section, there is a example of Pages/Movies/Index.cshtml :
@Html.DisplayFor(modelItem => item.Title)

Why does modelItem can relate to item?

Do I miss something or it is typo?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Activity

  1. added
    Source - Docs.ms
    on Apr 7, 2021
  2. Rick-Anderson commented on Apr 7, 2021

    @Rick-Anderson
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⌚ Not TriagedSource - Docs.ms

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions