Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
ASP.NET
ASP.NET MVC 2
System.Web.Mvc
 RegisterAllAreas Method (Object)
Collapse All/Expand All Collapse All
.NET Framework Class Library
AreaRegistration..::.RegisterAllAreas Method (Object)

Registers all areas in an ASP.NET MVC application by using the specified user-defined information.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
Visual Basic
Public Shared Sub RegisterAllAreas ( _
    state As Object _
)
C#
public static void RegisterAllAreas(
    Object state
)
Visual C++
public:
static void RegisterAllAreas(
    Object^ state
)

Parameters

state
Type: System..::.Object
An object that contains user-defined information to pass to the area.

The RegisterAllAreas method finds all types in the application domain that derive from AreaRegistration and calls each of their RegisterArea methods.

The state parameter enables you to pass any kind of information to the area that is being registered. For example, you might want the area to have some or all of the following information:

  • A reference to the HttpApplication object.

  • Repository information.

  • A reference to a log.

  • A reference to an Inversion of Control (IOC) container.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker