From 9a5989ca75ea15368256929bc2d24d722fa23543 Mon Sep 17 00:00:00 2001 From: Mark J Price Date: Sat, 4 Mar 2023 08:27:47 +0000 Subject: [PATCH] Update improvements.md --- docs/errata/improvements.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/errata/improvements.md b/docs/errata/improvements.md index c2b3ce4..cc5bc4b 100644 --- a/docs/errata/improvements.md +++ b/docs/errata/improvements.md @@ -304,11 +304,11 @@ In the next edition, I will add a warning, as shown in the following note: # Page 601 - Setting up an ASP.NET Core MVC website -This sections starts with a description of the three parts of MVC. For views, I wrote, "Views: Razor files, that is, `.cshtml` files, that render data in view models into HTML web pages. Blazor uses the `.razor` file extension, but do not confuse them with Razor files!" +This section starts with a description of the three parts of MVC. For views, I wrote, "**Views**: Razor files, that is, `.cshtml` files, that render data in view models into HTML web pages. Blazor uses the `.razor` file extension, but do not confuse them with Razor files!" -In the next edition, I will changed this text and add a warning: +In the next edition, I will improve this text and add a warning: -"Views: *Razor View* files, that is, `.cshtml` files, that render data in view models into HTML web pages. *Razor Views* are different from *Razor Pages* but they share the same file extension `.cshtml`. When creating a *Razor Page*, you must add the `@page` directive at the top of the file. When creating a *Razor View*, do NOT use the `@page` directive! If you do, the controller will not pass the model to it and the model in the view will be `null`, throwing a `NullRefertenceException` when you try to access any of its members. Blazor uses the `.razor` file extension, but do not confuse them with *Razor View* or *Razor Page* files! Blazor can also use the `@page` directive to allow a Blazor component to act like a page!" +"**Views**: *Razor View* files, that is, `.cshtml` files, that render data in view models into HTML web pages. *Razor Views* are different from *Razor Pages* but they share the same file extension `.cshtml`. When creating a *Razor Page*, it must have the `@page` directive at the top of its file. When creating a *Razor View*, do NOT use the `@page` directive! If you do, the controller will not pass the model and it will be `null`, throwing a `NullReferenceException` when you try to access any of its members. Also note that Blazor uses the `.razor` file extension, but do not confuse them with *Razor View* or *Razor Page* files! To add even more confusion, Blazor can also use the `@page` directive to allow a Blazor component to act like a page!" # Page 654 - Making controller action methods asynchronous