Is this HTML reuse?
Web pages in many places the same, there are different places.
Take the same place in the page, extract it, and form a document.
References in other Web pages are a traditional way of thinking about website development.
Of course, different technologies have different forms of expression.
For example, php,asp these languages to write an include directly.
and in ASP.
WebForm, a master page is presented. of course, the use of master pages is not recommended in this article.
I recommend using shtml.
Master Page
WebForm master Page (MasterPage), use the master page of the form.
Simply put, the master page uses ContentPlaceHolder to dig pits,
After you create a new page that uses the master page form, use the content pits.
But for web development, the master page is too cumbersome.
sHTML
Shtml:serversideinclude (SSI), the mainstream Web server (IIS, Apache, etc.) are supported. High efficiency, no need to go through the process of ASP, lightweight.
If you play PHP ASP or something, then I have nothing to say. Because it's exactly the same way.
Of course, how to use shtml in Visual Studio is a small problem. (especially simple)
1. Create
If you haven't used it, you'll never expect it.
When you add a project to Visual Studio, you cannot find the option to shtml the file at all.
The way to create shtml, is directly in, the creation of HTML when renamed to Xx.shtml.
2. Use
There's nothing to say about this thing, for a simple example.
Like what
In index.shtml, I want to cite top.html and footer.html.
Just add such a sentence in index.shtml.
<!--#include file= "top.html"-
Index.shtml the body of the page.
<!--#include file= "footer.html"-
In fact, today, the main thing is to say shtml how to create. Frankly, a picture can be said to be clear.
Master Page VS shtml-asp. NET Trivia (3)