Remove [ViewData] example using @Model with a controller (#17805)

pull/17812/head
Kirk Larkin 2020-04-14 23:31:15 +01:00 committed by GitHub
parent a92a74bed0
commit 5ec5c96d04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 6 deletions

View File

@ -266,12 +266,6 @@ public class HomeController : Controller
}
```
In the About view, access the `Title` property as a model property:
```cshtml
<h1>@Model.Title</h1>
```
In the layout, the title is read from the ViewData dictionary:
```cshtml