Share via


Controller.ExecuteCore Method

Invokes the action in the current controller context.

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

Syntax

'Declaration
Protected Overrides Sub ExecuteCore
protected override void ExecuteCore()
protected:
virtual void ExecuteCore() override

Remarks

This method is called by MVC to process a request; it cannot be called directly. This method can be overridden if you derive from the Controller class. If you override this method, call the base control's ExecuteCore method.

Examples

The following example shows how to override the ExecuteCore method.

protected override void ExecuteCore() {
   ActionInvoker = new CustomActionInvoker();
   base.ExecuteCore();
}
Protected Overloads Overrides Sub ExecuteCore() 
    ActionInvoker = New CustomActionInvoker() 
    MyBase.ExecuteCore() 
End Sub

See Also

Reference

Controller Class

System.Web.Mvc Namespace