Creating and implementing the BookLibraryAddEdit page
In the previous section, we created and implemented the BookLibraryListing
Razor template page that will be used to display a list of all book items that have been previously added to the BookItem
database table. Our next step is to begin creating the BookLibraryAddEdit
Razor template page—which will be used to allow the user to create a new book item or edit an existing book item—and save this to our BookItem
database table.
Let's start by creating the user interface for our BookLibraryAddEdit
by going through the following steps:
- Right-click on the
Views
folder and chooseAdd | New File...
from the pop-up menu, as you did when creating theBookLibraryListing
, in the Creating and implementing the BookLibraryListing page section in this chapter. - Next, choose the
Preprocessed Razor Template
option under theText Templating
section and enterBookLibraryAddEdit
as the name of the Razor template to be created. - Finally, click on the
New
button...