Master Pages are a new feature of ASP.NET 2.0, which allow for template-based web programming. A common requirement for web sites is that they provide a consistent look and feel between pages - for example, Wikipedia provides the same navigation system on the left edge of the page and along the top, regardless of what article is displayed. Master Pages give the ASP.NET programmer a new way of achieving this.
In the past, developers have used a number of methods to work around the lack of templates in ASP.NET. Because the .NET platform is object oriented and allows for inheritance, many developers would define a new base class that inherits from System.Web.UI.Page, write methods here that render HTML, and then make the pages in their application inherit from this new class. While this allows for common elements to be reused across a site, it adds complexity and mixes code with markup. Furthermore, this method can only be visually tested by running the application - not while designing it. Other developers have used include files and other tricks to avoid having to implement the same navigation and other elements in every page. Status OK. |