Book Image

ASP.NET Core 2 Fundamentals

By : Onur Gumus, Mugilan T. S. Ragupathi
Book Image

ASP.NET Core 2 Fundamentals

By: Onur Gumus, Mugilan T. S. Ragupathi

Overview of this book

The book sets the stage with an introduction to web applications and helps you build an understanding of the tried-and-true MVC architecture. You learn all about views, from what is the Razor view engine to tagging helpers. You gain insight into what models are, how to bind them, and how to migrate database using the correct model. As you get comfortable with the world of ASP.NET, you learn about validation and routing. You also learn the advanced concepts, such as designing Rest Buy (a RESTful shopping cart application), creating entities for it, and creating EF context and migrations. By the time you are done reading the book, you will be able to optimally use ASP.NET to develop, unit test, and deploy applications like a pro.
Table of Contents (14 chapters)

Chapter 3. Views

Views are the actual output of an application which are delivered to the user. They are what users actually see on the screen when they access your application. All components, including menus, input elements, dialog boxes, and everything else the user sees come from your views. If you do not provide a good user experience when accessing your application, users will not care how great your application is. So, views play a critical role when building an ASP.NET MVC application. Separating views from a controller allows the HTML design process to be separate from the logic. It is also beneficial in terms of unit testing the controller.

By the end of this chapter, you will be able to:

  • Explain the purpose of the view engine and the Razor view engine
  • Program in the Razor view engine and use different programming constructs
  • Work with the layout in ASP.NET Core and its features
  • Generate HTML code
  • Create and call partial views
  • Create a view component
  • Create custom Tag Helpers