fix formatting cshtml -> html

pull/4921/head
rick-anderson 2017-12-04 08:27:42 -10:00
parent 4e22a25a7e
commit b7afbe4b5c
4 changed files with 15 additions and 15 deletions

View File

@ -184,7 +184,7 @@ Update the Index page:
The following markup shows the updated page:
[!code-cshtml[](intro/samples/cu/Pages/Departments/Index.cshtml?highlight=5,8,29,47,50)]
[!code-html[](intro/samples/cu/Pages/Departments/Index.cshtml?highlight=5,8,29,47,50)]
### Update the Edit page model
@ -216,7 +216,7 @@ The `ModelState.Remove` statement is required because `ModelState` has the old `
Update *Pages/Departments/Edit.cshtml* with the following markup:
[!code-cshtml[](intro/samples/cu/Pages/Departments/Edit.cshtml?highlight=1,14,16-17,37-39)]
[!code-html[](intro/samples/cu/Pages/Departments/Edit.cshtml?highlight=1,14,16-17,37-39)]
The preceding markup:
@ -271,7 +271,7 @@ The Delete page detects concurrency conflicts when the entity has changed after
Update *Pages/Departments/Delete.cshtml* with the following code:
[!code-cshtml[](intro/samples/cu/Pages/Departments/Delete.cshtml?highlight=1,10,36,51)]
[!code-html[](intro/samples/cu/Pages/Departments/Delete.cshtml?highlight=1,10,36,51)]
The preceding markup makes the following changes:

View File

@ -67,11 +67,11 @@ Open *Pages/_Layout.cshtml* and make the following changes:
The changes are highlighted.
[!code-cshtml[](intro/samples/cu/Pages/_Layout.cshtml?highlight=6,29,35-39,47&range=1-50)]
[!code-html[](intro/samples/cu/Pages/_Layout.cshtml?highlight=6,29,35-39,47&range=1-50)]
In *Views/Home/Index.cshtml*, replace the contents of the file with the following code to replace the text about ASP.NET and MVC with text about this app:
[!code-cshtml[](intro/samples/cu/Pages/Index.cshtml)]
[!code-html[](intro/samples/cu/Pages/Index.cshtml)]
Press CTRL+F5 to run the project. The home page is displayed with tabs created in the following tutorials:

View File

@ -100,7 +100,7 @@ The preceding code adds `AsNoTracking`. `AsNoTracking` improves performance beca
Update *Views/Courses/Index.cshtml* with the following highlighted markup:
[!code-cshtml[](intro/samples/cu/Pages/Courses/Index.cshtml?highlight=4,7,15-17,34-36,44)]
[!code-html[](intro/samples/cu/Pages/Courses/Index.cshtml?highlight=4,7,15-17,34-36,44)]
The following changes have been made to the scaffolded code:
@ -194,7 +194,7 @@ The query has two includes:
Update *Pages/Instructors/Index.cshtml* with the following markup:
[!code-cshtml[](intro/samples/cu/Pages/Instructors/IndexRRD.cshtml?range=1-65&highlight=1,5,8,16-21,25-32,43-57)]
[!code-html[](intro/samples/cu/Pages/Instructors/IndexRRD.cshtml?range=1-65&highlight=1,5,8,16-21,25-32,43-57)]
The preceding markup makes the following changes:
@ -272,7 +272,7 @@ The following code populates the view model's `Enrollments` property when a cour
Add the following markup to the end of the *Pages/Courses/Index.cshtml* Razor Page:
[!code-cshtml[](intro/samples/cu/Pages/Instructors/IndexRRD.cshtml?range=60-102&highlight=7-)]
[!code-html[](intro/samples/cu/Pages/Instructors/IndexRRD.cshtml?range=60-102&highlight=7-)]
The preceding markup displays a list of courses related to an instructor when an instructor is selected.
@ -290,7 +290,7 @@ Update the query in the `OnGetAsync` method in *Pages/Instructors/Index.cshtml.c
Update *Pages/Instructors/Index.cshtml*. Add the following markup to the end of the file:
[!code-cshtml[](intro/samples/cu/Pages/Instructors/IndexRRD.cshtml?range=103-)]
[!code-html[](intro/samples/cu/Pages/Instructors/IndexRRD.cshtml?range=103-)]
The preceding markup displays a list of the students who are enrolled in the selected course.

View File

@ -75,7 +75,7 @@ The method uses LINQ to Entities to specify the column to sort by. The code init
Replace the code in *Students/Index.cshtml*, with the following highlighted code:
[!code-cshtml[](intro/samples/cu/Pages/Students/Index2.cshtml?highlight=17-19,25-27)]
[!code-html[](intro/samples/cu/Pages/Students/Index2.cshtml?highlight=17-19,25-27)]
The preceding code:
@ -131,7 +131,7 @@ There is a performance penalty for calling `ToUpper`. The `ToUpper` code adds a
In *Views/Student/Index.cshtml*, add the following highlighted code to create a **Search** button and assorted chrome.
[!code-cshtml[](intro/samples/cu/Pages/Students/Index3.cshtml?highlight=14-23&range=1-25)]
[!code-html[](intro/samples/cu/Pages/Students/Index3.cshtml?highlight=14-23&range=1-25)]
The preceding code uses the `<form>` [tag helper](xref:mvc/views/tag-helpers/intro) to add the search text box and button. By default, the `<form>` tag helper submits form data with a POST. With POST, the parameters are passed in the HTTP message body and not in the URL. When HTTP GET is used, the form data is passed in the URL as query strings. Passing the data with query strings enables users to bookmark the URL. The [W3C guidelines](https://www.w3.org/2001/tag/doc/whenToUseGet.html) recommend that GET should be used when the action does not result in an update.
@ -209,15 +209,15 @@ The two question marks in `PaginatedList.CreateAsync` represent the [null-coales
Update the markup in *Students/Index.cshtml*. The changes are highlighted:
[!code-cshtml[](intro/samples/cu/Pages/Students/Index.cshtml?highlight=28-31,37-40,68-)]
[!code-html[](intro/samples/cu/Pages/Students/Index.cshtml?highlight=28-31,37-40,68-)]
The column header links use the query string to pass the current search string to the `OnGetAsync` method so that the user can sort within filter results:
[!code-cshtml[](intro/samples/cu/Pages/Students/Index.cshtml?range=28-31)]
[!code-html[](intro/samples/cu/Pages/Students/Index.cshtml?range=28-31)]
The paging buttons are displayed by tag helpers:
[!code-cshtml[](intro/samples/cu/Pages/Students/Index.cshtml?range=72-)]
[!code-html[](intro/samples/cu/Pages/Students/Index.cshtml?range=72-)]
Run the app and navigate to the students page.
@ -263,7 +263,7 @@ Note: The LINQ `group` command isn't currently supported by EF Core. In the prec
Replace the code in the *Views/Home/About.cshtml* file with the following code:
[!code-cshtml[](intro/samples/cu/Pages/About.cshtml)]
[!code-html[](intro/samples/cu/Pages/About.cshtml)]
Run the app and navigate to the About page. The count of students for each enrollment date is displayed in a table.