In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains the function of ASP.NET master page and what is the difference between master page and ordinary page. Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn the role of the ASP.NET master page and what is the difference between it and the ordinary page.
What does the template page do?
The use of template pages can easily and quickly create a unified style of ASP.NET website, and easy to manage and maintain, improve the efficiency.
Template pages define the appearance and standards required for web pages, creating individual content pages that contain display content on the basis of the master. When the user requests content pages, the content pages are merged with the master page so that the layout of the template page and the layout of the content page can be combined for output.
Template pages are generally used to:
1. Deal with the general functions of the web page by modifying the template page.
2. You can easily create a set of controls and code, and apply them to a group of web pages.
3. The template page can control the layout of the final page in detail by allowing you to control how the placeholder controls are rendered.
Template page and normal page
We set up a template page in vs where we can see what is different from normal content:
@ Master replaces @ Page and contains multiple replaceable placeholders, ContentPlaceHolder.
Associate normal pages with master pages:
The property of a normal page, MasterPageFile, will prompt you to select a master page to use, or choose to use a master page when creating a new page, or you can apply a master page to a normal page.
DEMO:
Template page code:
Template page
The log of the website, the number of searches, the number of logins, the navigation information of the site, etc. Copyright information at the bottom, etc.
Content page code:
Add content Page
Display:
About master pages and themes:
The same as the master and theme in PPT. It goes like this:
Using the template, you can add your own content on the basis of it, which is equivalent to a good framework, style and so on. The master is equivalent to a component, and you need to build this framework, style, and so on. Master is that we abstract the same unchanged parts from many similar structured web pages, and can be applied to more web pages to save time.
At this point, I believe that you have a deeper understanding of the role of the ASP.NET master page and what is the difference between the master page and the ordinary page. You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.