Chapter 7. Master Pages
No matter how good of a design you have for your site, it can be completely for naught if it isn't carried forward consistently throughout your site. Up to this point you have learned the basics of creating a site that is aesthetically pleasing and, hopefully, easy for your visitors to use. You have received an overview of the different considerations you should take into account when planning your web projects, such as browser variations, the potential audience, and accessibility. You have learned the basics of image creation and design. You have received an introduction and overview of Cascading Style Sheets and how to use the power of Visual Studio to integrate these rules into your website. And, finally, you have learned how to create consistent, flexible, and accessible navigation for your site.
But all of this was for one page (Default.aspx
). Copying this code to every page in your site would be, to say the least, a maintenance nightmare. Can you imagine having to update thousands of pages because the user wants a fairly minor design tweak? What you really want is a way to create a reusable template that can be incorporated into every page of your site. This will allow for all pages to look the same throughout your project, while allowing for easier maintenance as your projects mature. In a year or so when you want to redo the entire site, you only need to change the template rather than the coding on every page of your application. With Master Pages, ...
Get Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.