Skip to content

Fix controller reference in MvcMovie10 layout to match tutorial flow#36708

Merged
wadepickett merged 2 commits intomainfrom
copilot/fix-layout-controller-reference
Jan 28, 2026
Merged

Fix controller reference in MvcMovie10 layout to match tutorial flow#36708
wadepickett merged 2 commits intomainfrom
copilot/fix-layout-controller-reference

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

The MvcMovie10 sample's shared layout referenced the Movies controller, which doesn't exist at this stage of the tutorial. At this point we are working with the new HelloWorld controller as instructed in Part 3 ("Add a View").

Changes

  • Updated aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Views/Shared/_Layout.cshtml line 15
  • Changed asp-controller="Movies" to asp-controller="HelloWorld"
  • Aligns with MvcMovie90 sample which already had the correct reference
- <a class="navbar-brand" asp-area="" asp-controller="Movies" asp-action="Index">Movie App</a>
+ <a class="navbar-brand" asp-area="" asp-controller="HelloWorld" asp-action="Index">Movie App</a>
Original prompt

This section details on the original issue you should resolve

<issue_title>Start MVC: Views tutorial points to wrong controller in layout</issue_title>
<issue_description>### Description

The layout file shows the movies controller but should show the new helloworld controller hookup:

In the .NET 10 version of the sample shared layout at line 15:

<a class="navbar-brand" asp-area="" asp-controller="Movies" asp-action="Index">Movie App</a>

aspnetcore/tutorials/first-mvc-app/start-mvc/sample/MvcMovie10/Views/Shared/_Layout.cshtml

<a class="navbar-brand" asp-area="" asp-controller="Movies" asp-action="Index">Movie App</a>

should be

<a class="navbar-brand" asp-area="" asp-controller="HelloWorld" asp-action="Index">Movie App</a>

This has already been fixed for the .NET 9 sample, just fix the .NET 10 sample.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/adding-view?view=aspnetcore-10.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

Platform Id

e81aa33a-13c8-c305-33ec-fcad6bfc8d6b

Article author

@wadepickett

Metadata

  • ID: 788d46c9-a91a-2788-8db7-b53c37b512f2
  • PlatformId: e81aa33a-13c8-c305-33ec-fcad6bfc8d6b
  • Service: aspnet-core
  • Sub-service: tutorials

Related Issues</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix layout controller reference in .NET 10 sample Fix controller reference in MvcMovie10 layout to match tutorial flow Jan 28, 2026
Copilot AI requested a review from wadepickett January 28, 2026 21:40
@wadepickett wadepickett requested a review from Copilot January 28, 2026 22:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an incorrect controller reference in the MvcMovie10 sample's shared layout file to align with the tutorial flow. Students working through Part 3 of the "First MVC App" tutorial are working with the HelloWorld controller at this stage, not the Movies controller (which is introduced later in the tutorial).

Changes:

  • Updated the navbar brand link in _Layout.cshtml to reference HelloWorld controller instead of Movies controller
  • Aligns MvcMovie10 sample with MvcMovie90 sample which already had the correct reference

@wadepickett wadepickett requested a review from tdykstra January 28, 2026 22:11
@wadepickett
Copy link
Contributor

Related to #36673 which corrected the .NET 9 version only.

@wadepickett wadepickett marked this pull request as ready for review January 28, 2026 22:16
@wadepickett wadepickett merged commit 0921f8e into main Jan 28, 2026
10 checks passed
@wadepickett wadepickett deleted the copilot/fix-layout-controller-reference branch January 28, 2026 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Start MVC: Views tutorial points to wrong controller in layout

4 participants