Hello: I've been successfully able to use Ninject with MVC 3/4 and the WCF Extensions. I am now trying to do a simple implementation with WebForms and ran into a challenge. The steps:
- I downloaded the Ninject.Web from NuGet and installed into my WebForms project
I edited the NinjectWebCommon.cs -> CreateKernel method:
kernel.Bind<ICasePresenter>().To<Presenter.CasePresenter>();
I edited my user control:
[Inject] private ICasePresenter presenter; public CaseSummaryControl(ICasePresenter presenter) { this.presenter = presenter; }
I can see the breakpoint hit my binding but then I get the error that the user control does not contain a constructor that takes 0 arguments. It's not injecting my instance (even if I add a constructor with no arguments, the private var ends up being null.
Thanks in advance!