Pages node of Web.Config

Posted Thursday, June 2, 2005 9:22 AM by C-Dog's .NET Tip of the Day
The pages node of the web.config contains a lot of new settngs that can be used to set compiler directives globally.  Beside from the usual stuff such as Disabling Session State and View State, it has tags to specify a master page for all pages as well as the ability to set base classes for both pages and controls.  To specify an inherited page or control, simply use the pageBaseType or userControlBaseType properties respectively.  Here is the list of attributes the node supports now.  Also as mentioned in a previous post, you can globally register a control or collection of controls from an assembly by using the registerTagPrefixes node.
<pages     
  buffer="true|false"   enableSessionState="true|false|ReadOnly"
  enableViewState="true|false"
  enableViewStateMac="true|false"
  autoEventWireup="true|false"
  master="file path" 
  smartNavigation="true|false"
  pageBaseType="typename, assembly"
  userControlBaseType="typename"
  validateRequest="true|false">
  <imports>
    <add namespace="namespace"/>
    <remove namespace="namespace"/>
    <clear/>
  </imports>
  <registerTagPrefixes>
    <add tagPrefix="MyTags" namespace="MyNamespace"/>
  </registertagPrefixes>
</pages>

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=114