If you are a web developer, face a large number of pages containing duplicate content, you must use the "template" to define the public part of the web page, and each page only needs to complete its unique content, generate the final page through the template .
Familiar with Dreamweaver web developers will like the template feature. But when we convert to the ASP.NET platform, it has to use a Microsoft's development environment that can only be considered a text editor (of course, this should be a perfect text editor), Microsoft is only in terms of graphical web design. Can be an outer country. Despite this, even without the graphical design interface you have obtained, Microsoft and other open source sides will provide us with a wealth of web form front-end controls. The masterpages can be said to be the most useful because it implements template feature in Dreamweaver, and with the support of the ASP.NET framework, using templates becomes easier, we can even add a lot of features to your template.
Implement Web Form Templates with MasterPages
Define template control
If our form layout is divided into upper and lower three parts, the middle part is a specific content area, then the final template content can be like this:
<% @ Register tagprefix = "mp" namespace = "microsoft.web.samples.masterpages" assembly = "masterpages"%>