in

Dot Net Mafia

Group site for developer blogs dealing with (usually) .NET, SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for SharePoint 2013, SharePoint 2010, Office 365, SharePoint Online, MOSS 2007, ASP.NET, LINQ, and Visual Studio 2012.

Pages node of Web.Config

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

2012 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems