I was too impatient to wait for .NET 2.0's Master Pages, so I started to look at some of the (many) implementations for master pages in ASP.NET 1.1 ...
I ran across this article at CodeProject and I started to implement it in my new project. The basic idea behind it is to parse a child page (Context Page) and before Viewstate is even loaded, it does a Server.Execute to execute the desired master page, and the master page just loads its controls into the HttpContext (it makes sure not to render itself). The execution resumes at the Context page and the entire control collection of <form> is copied into a specifically named control and finishes execution!
The master page looks like this:
<html>
...
<div id="masterContextContainer"> </div>
</html>
That's it! Mark the class with the [MasterPage()] attribute and it's ready to go!
The Context Page is just a normal aspx page that has the class marked as [ContextPage(masterPageAlias)] and it's done.
There are a number of different methods to accomplish this, but I found this one to be very nice because A) I can inherit my PageBase class from this MasterContextPage and start using it on existing web forms... B) it's very clever!
The only thing I found that is a little iffy is the Tracing. If you have both pages enabled it messes up, so make sure and set the Master Page to trace="false" so that you don't get any conflicts with control id's.