title: Applying Dependency Injection on an ASP.NET web forms application built using MVP Pattern
body: <p>I am creating an ASP.NET Web forms application with MVP pattern. The structure of my view is something like this:</p>
  
  <pre><code>public partial class ShipperView : System.Web.UI.Page, IShipperView
  {
         ShipperPresenter presenter;
         public ShipperOperationsView()
          {
              IShipperOperations operations = new ShipperOperations();
              INavigator navigator = new Navigator();
              presenter = new ShipperPresenter(this,operations,navigator);  //Instantiating presenter
          }
          ...
  }
  </code></pre>
  
  <p>The basic structure of my presenter is something like this:</p>
  
  <pre><code>public class ShipperPresenter
  {
          IShipper shipperView;
          IShipperOperations operations;
          INavigator navigator;
          public ShipperPresenter(IShipperView view,IShipperOperations operations,INavigator navigator)
          {
              shipperView = view;
              this.operations = operations;
              this.navigator = navigator;
          }
          ...
  }
  </code></pre>
  
  <p>I don't want to instantiate my presenter using the new keyword, I would like to replace it with resolving dependency. During the dependency resolution, I want to pass the instance of the present view to the dependency resolver. I tried searching a lot on this but did not get any satisfactory answer.</p>
  
  <p>Can this issue be resolved using any of the IoC containers like StructureMap, Ninject, Unity or MEF? Any pointer would be of great help.</p>