Open DocVD opened 2 weeks ago
In Step 13, you should have created a Razor view named Shipper.cshtml
in the Views/Home
folder:
As you can see from your error message, ASP.NET Core cannot find that file. Check that you have that file and that it is NOT a Razor Page (it must NOT have a
@page
directive at the top.)
I have created an improvement item for this here: https://github.com/markjprice/apps-services-net8/blob/main/docs/errata/improvements.md#page-648---exploring-the-anchor-tag-helper
On page 649, step-16, another anchor tag is used to pass dictionary to current page: <a asp-controller="Home" asp-action="Shipper" asp-all-route-data="await GetShipperData()" class="btn btn-outline-primary">Shipper
However, this produces the error: An unhandled exception occurred while processing the request. InvalidOperationException: The view 'Shipper' was not found. The following locations were searched: /Views/Home/Shipper.en-US.cshtml /Views/Home/Shipper.en.cshtml /Views/Home/Shipper.cshtml ... So I modified the asp-action="asp-action="Index" instead and I get no issues. Is that what is expected?