This video describes how to use layout pages to create reusable content and a consistent appearance for all pages in an ASP.NET Web Pages site.
- [Instructor] Many websites that you're familiar with … have content that displays on every page, … like the header and footer. … ASP.NET webpages offers a feature called Layout pages … where you can place common content … that's shared across the site. … Let's take a look at the Layout file that was generated … when we created our razor website. … Open the underscore Site Layout file … at the root of the application. … In the head element we're including third party … script libraries like jQuery … so we don't have to include them in individual pages. … Scrolling down, here's the header element … where we can display things like the logo for the site. … There's also a razor code block on line 22 … with conditional logic to check … if the user is authenticated … and based on that, display different menu items. … Let's inspect the code starting at line 47. … This is where ASP.NET will insert content blocks … into the Layout page. … The Render Section Method is how you render … a named section that's defined in a content page. …
Author
Released
3/7/2019- Capabilities of the ASP.NET platform
- Running and debugging a web application
- Creating a Web Forms application
- Building dynamic pages with Razor syntax
- Working with models and forms in ASP.NET MVC
- Data access with Entity Framework
- Building RESTful services using ASP.NET Web API
- Real-time web functionality with SignalR
Skill Level Beginner
Duration
Views
Related Courses
-
ASP.NET Core New Features
with Phil Japikse3h 48m Intermediate
-
Introduction
-
What you should know1m 34s
-
1. Get Started with ASP.NET Development
-
Explore the ASP.NET platform4m 47s
-
Visual Studio basics5m 49s
-
-
2. Build Dynamic Websites with ASP.NET Web Forms
-
Introduction to Web Forms3m 22s
-
Understand state management5m 26s
-
-
3. Programming with ASP.NET Web Pages
-
4. Build Web Applications with ASP.NET MVC
-
Sample web application setup5m 37s
-
Work with models and forms7m 56s
-
5. Work with Data
-
Querying data with LINQ7m 1s
-
6. Create RESTful Services with Web API
-
Web API with Ajax5m 22s
-
7. Real-Time Web Functionality with SignalR
-
Conclusion
-
Next steps1m 33s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Create a consistent UI with layouts