UserControl.GetController Method
Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

UserControl.GetController Method

Returns the controller stored by SetController.

[Visual Basic]
Protected Overridable Sub GetController()
protected virtual object GetController();

Return Value

The controller for this control.

If no controller is set, a reference to the control itself is returned.


The default implementation uses a field to retrieve the reference.

If external controller is not specified, control will serve as its own controller, which will allow data binding to work properly.

You may override this method e.g. to return Controller in order to have your control bind to the same controller as your page. When overriding this behaviour, derived classes must ensure to also change the behaviour of SetController accordingly.

See Also

UserControl Class | Spring.Web.UI Namespace