AreaRegistration.RegisterAllAreas Method

 

Registers all areas in an ASP.NET MVC application.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static RegisterAllAreas()

Registers all areas in an ASP.NET MVC application.

System_CAPS_pubmethodSystem_CAPS_static RegisterAllAreas(Object)

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

Remarks

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

See Also

AreaRegistration Class
System.Web.Mvc Namespace

Return to top

AreaRegistration.RegisterAllAreas Method ()

Registers all areas in an ASP.NET MVC application.

Syntax

public static void RegisterAllAreas()
public:
static void RegisterAllAreas()
static member RegisterAllAreas : unit -> unit
Public Shared Sub RegisterAllAreas

Remarks

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

Return to top

AreaRegistration.RegisterAllAreas Method (Object)

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

Syntax

public static void RegisterAllAreas(
    object state
)
public:
static void RegisterAllAreas(
    Object^ state
)
static member RegisterAllAreas : 
        state:Object -> unit
Public Shared Sub RegisterAllAreas (
    state As Object
)

Parameters

  • state
    Type: System.Object

    An object that contains user-defined information to pass to the area.

Remarks

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.

Return to top