Chapter 6Creating Consistent Looking Websites


  • How to use master and content pages that enable you to define the global look and feel of a web page
  • How to work with a centralized base page that enables you to define common behavior for all pages in your site
  • How to create themes to define the look and feel of your site with an option for the user to choose a theme at run time
  • How to create skins to make site-wide changes to control layout
  • What the ASP.NET page life cycle is and why it’s important


You can find the code downloads for this chapter on the Download Code tab at The code is in the Chapter 6 folder.

When you’re building a website you should strive to make the layout and behavior as consistent as possible. Consistency gives your site a professional appearance and it helps your visitors to find their way around the site. Fortunately, ASP.NET 4.5.1 and Visual Studio 2013 offer a number of great features and tools to implement a consistent design, helping you to create great-looking pages in no time.

In previous chapters you learned how to work with VS, HTML5, CSS, and server controls to create your web pages visually. Chapter 5 introduced you to programming in ASP.NET. This chapter is the first that combines these concepts, by showing you — among many other things — how to use programming code to change the appearance of the site.

The first section shows ...

Get Beginning ASP.NET 4.5.1: in C# and VB now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.