Preface:
I have had some research on the object model of ASP.NET Framework and ASP.NET Page, and some interesting technologies in ASP.NET have some research, such as MasterPage technology. When discussing how WebForm's unified page is schema, there are two optional options:
1. The first program is the most original solution. In each business form (ASPX), in addition to the masterpage that contains yourself, it will contain Topbanner, LeftBanner, Bottombanner. The disadvantage of this solution I will not mention it here.
2. The second solution is to provide a Unified Page Template: Default.aspx, which contains Topbanner, LeftBanner, MasterPage, Bottombanner total, where MasterPage is dynamically variable. All of the user's page request turns to the Default.aspx page, and PageId is added in the querystring of the URL. When the request is in response to each request of the customer, DEFAULT.ASPX reads the value of PageID, according to different PageId, according to different PageId, according to different PageId, depending on the configuration. Although this approach solves the problems in the programs, it is a very awkward process for customers or developers: I need to turn to MasterPage. Its benefits and disadvantages are obvious.
???
Can there be a way to define a unified style page template, and implement each of the business-related forms (not including a public HTML module); and presentation when the browser requests each business form, rendering That unified style page template, and in this template's Master area embedded your own business form? There are many ways to solve this problem in ASP.NET1.1, in which the mature scheme is MasterPage technology! And how this technology has been provided in Aspt.net 2.0 (how to implement aspt.net2.0) I have not studied. The following research is the technology under ASP.NET1.1).
MasterPage Technical Idea:
The so-called MASTERPAGE technology is to provide a page template, which can be designed a unified template based on specific needs, such as Topbanner, LeftBanner, part of the Bottombanner section, as shown below:
The various business forms of the developers do not contain any Topbanner, LeftBanner, Bottombanne section, with only the business-related UI content. As shown below:
When the browser requests each individual business form, each form does not only present its own content, which will first present the page template, let the work-related UI content into the masterpage area of the page template (yellow area ).
MasterPage specific implementation technology:
About how to implement MasterPage Technology on the Internet by many implementations. More than a few examples are: http://www.codeproject.com/aspnet/frame_work_design.asp on www.codeproject.com
Www.cnblogs.cn http://mack.cnblogs.com/archive/2005/06/18/176869.html
Among them, WWW.CNBLOGS.CN design is an improvement plan for www.codeproject.com. Here I will find out about their technical points: 1. First of all, they have developed a WebControl inherited HTMLFORM, I am here to call MasterPageform
2. In each business form page, use this masterpageform instead of HTMLFORM, that is, when the original ASPX page is: