SoFunction
Updated on 2025-03-04

Getting started with the master page and shtml instances

This article analyzes the middle master page and shtml in a more in-depth and easy-to-understand manner. Share it for your reference. The specific analysis is as follows:

Master page

Create and use master pages:

1. Create a master page of Webform (MasterPage)
2. Create a form (ContentPage) that uses the master page.
3. Use ContentPlaceHolder to dig holes on the master page, and use Content to fill the holes on the master page

The master page is the server that helps us splice the page response to the browser.

However, the master page is too bulky. It is recommended to use shtml.

shtml

ServerSideInclude (SSI), mainstream web servers (iis, apache, etc.) are supported. High efficiency, no processing required, lightweight.

Create and use shtml:

Create two files first: and then create one

By adding the following code to achieve code reuse and file stitching.

<!--#include file=""—>
//Place custom code here.<!--#include file=""-->

I hope this article will be helpful to everyone's programming.