Prev | Current Page 38 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"


Figure 1-1. The Controls Book 2 web site??™s master page
Web forms added to the project can be configured to use the master page rendering at
design time, like Figure 1-2.
Notice in Figure 1-2 that the master page area is grayed out (and cannot be edited) at design
time in a web content form. The design-time view displays the master page HTML and the web
content form HTML, providing a more accurate view of the rendered web form. Listings 1-1
and 1-2 show the master page source page and code-behind file.
CHAPTER 1 ?–  SERVER CONTROL BASICS 3
Figure 1-2. The Controls Book 2 web site??™s master page displayed in a web content form
Listing 1-1. The ControlsBook2 Master Page File
<%@ Master Language="C#" AutoEventWireup="true"
CodeBehind="ControlsBook2MasterPage.master.cs"
Inherits="ControlsBook2Web.MasterPage.ControlsBook2MasterPage" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Master Page