<PackageReference Include="Castle.Windsor" Version="4.1.0" />

WebUserControlComponentActivator

Attempts to dynamically load a UserControl by invoking Page.LoadControl. There are two uses of this class.

1) Add a component to the Kernel and add a VirtualPath attribute specifying the relative path of the .ascx file for the associated UserControl. (easy)

<component id="BasketView" service="Castle.ShoppingCart.IBasketView, Castle.ShoppingCart" type="Castle.ShoppingCart.BasketView, Castle.ShoppingCart" lifestyle="transient" virtualPath="~/Views/BasketView.ascx" />

2) Precompile a UserControl and add the pre-compiled class to the Kernel. (hard) Has not been tested with proxies.

Initializes a new instance of the WebUserControlComponentActivator class.