Skip to content

First MVC App: ViewData["Title"] set but not used in the title-element #31219

Open
@n2ossareh

Description

@n2ossareh

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 <title>@ ViewData["Title"] </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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions