Nov 30, 2005 12:56 PM|NHuffman|LINK
Specifies a path to a base class for a page and its associated code-behind class. This attribute is optional, but when it is used the
CodeFile attribute must also be present. Use this attribute when you want to implement a shared scenario, where you define common fields (and optionally, associated events) in a base class to reference the controls declared in a Web page. Because of
the ASP.NET code generation model, if you defined the fields in a base class without using the this attribute, at compile time new member definitions would be generated for the controls declared in the Web page (within a separate partial class stub), and your
desired scenario would not work. But if you use the CodeFileBaseClass attribute to associate the base class with the page, and you make your partial class (its name is assigned to the
Inherits attribute and its source file is referenced by the CodeFile attribute) inherit from the base class, then the fields in the base class will be able to reference the controls on the page after code generation.