mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-01-04 23:29:58 +01:00
Update improvements.md
This commit is contained in:
parent
b79899f573
commit
9a5989ca75
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue