
Layout in ASP.NET Core | Microsoft Learn - learn.microsoft.com
Jun 3, 2022 · This document discusses layouts for the two different approaches to ASP.NET Core MVC: Razor Pages and controllers with views. For this topic, the differences are minimal: Razor Pages are in the Pages folder.
Razor syntax reference for ASP.NET Core | Microsoft Learn
Sep 27, 2024 · Sets the namespace of the class of the generated Razor page, MVC view, or Razor component. Sets the root derived namespaces of a pages, views, or components classes from the closest imports file in the directory tree, _ViewImports.cshtml (views or pages) or _Imports.razor (Razor components).
ASP.NET Core Blazor layouts | Microsoft Learn
May 5, 2025 · Use the @layout Razor directive to apply a layout to a routable Razor component that has an @page directive. The compiler converts @layout into a LayoutAttribute and applies the attribute to the component class.
Creating a Consistent Layout in ASP.NET Web Pages (Razor) Sites
Jul 11, 2022 · This article explains how you can use layout pages in an ASP.NET Web Pages (Razor) website to create reusable blocks of content (like headers and footers) and to create a consistent look for all the pages in the site.
Introduction to Razor Pages in ASP.NET Core | Microsoft Learn
Explains how Razor Pages in ASP.NET Core makes coding page-focused scenarios easier and more productive than using MVC.
ASP.NET Core - Simpler ASP.NET MVC Apps with Razor Pages
The sample shows how to organize an app with several distinct functional areas using traditional MVC, MVC with Areas, MVC with Feature Slices and Razor Pages. Explore these different approaches and see which ones will work best in your own ASP.NET Core applications.
Integrate ASP.NET Core Razor components with MVC or Razor Pages
Nov 18, 2024 · Learn about Razor component integration scenarios for MVC or Razor Pages, including prerendering of Razor components on the server.
Tutorial: Get started with Razor Pages in ASP.NET Core
Aug 5, 2024 · A .cshtml file that has HTML markup with C# code using Razor syntax. A .cshtml.cs file that has C# code that handles page events. Supporting files have names that begin with an underscore. For example, the _Layout.cshtml file configures UI elements common to all pages.
Integrate ASP.NET Core Razor components with MVC or Razor …
Nov 18, 2024 · Learn about Razor component integration scenarios for hosted Blazor WebAssembly apps with MVC or Razor Pages, including prerendering of Razor components on the server.
Get started with ASP.NET Core MVC | Microsoft Learn
Mar 2, 2025 · This tutorial teaches ASP.NET Core MVC web development with controllers and views. If you're new to ASP.NET Core web development, consider the Razor Pages version of this tutorial, which provides an easier starting point.