dotnet / dotnet/AspNetCore.Docs
First MVC App: ViewData["Title"] set but not used in the title-element
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
### Description
1) in "for" statement for the view, there is an ! mark just before the second semicolon. Please remove it.
2) The ViewData["Title"] is set to "Welcome", but it has not been used in the title-element. Instead the hardcoded string "Welcome" has been re-used. Please change the Title element to @ ViewData["Title"] .
### Page URL
https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-view?view=aspnetcore-8.0&tabs=visual-studio
### Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/first-mvc-app/adding-view.md
### Document ID
00c2c01d-d235-2d2d-5c96-1f33a9314382
### Article author
@wadepickett
Contributor guide
Assessment
This issue has not been assessed yet.