I want to inject a presenter into my webform class. While doing so I would like the injected presenter to contain a reference to the view it is being injected into. Inject a class with a reference to the class it is injected into. Is it possible to do this with Ninject? When injecting into a webforms class, is the injection performed before the constructor is executed? Should I rather just inject the presenter and use the constructor to pass the view?
Can Ninject inject a class and make it reference the target class as a back reference?
547 Views Asked by Lars Kristian Hagen At
1
There are 1 best solutions below
Related Questions in DEPENDENCY-INJECTION
- How to add logging to an abstract class in php
- Nest.js can't resolve dependencies of the external library's Reflector dependency
- Do we need IoC containers in typescript if ts-mock-imports exists
- Blazor/Razor resolve components using dependency injection
- Access Registed Scoped Services and Transient Services using GetService()
- using state data class alongside ComposeDestinations
- Messing up with conflict between spring jcl and commons-logging.jar
- How to write pytest tests for a FastAPI route involving dependency injection with Pydantic models using Annotated and Depends?
- .NET Core Include Method in Dependency Injection
- Injecting IHubContext into my background service for SignalR in .NET 5
- Issue with service method call in .NET Background Service , Issue with Scope
- How can I inject the prisma io module using inversify in my node.js project?
- Angular service injection hierarchy
- Trouble with "dotnet run seeddata" when trying to seed a database with EntityFrameworkCore. Specifically with ASP.NET Core 6 Web API
- NX Angular unit tests fail because of NullInjectorError
Related Questions in WEBFORMS
- how do I change a URL with form to include additional selection
- How to unprotect ASP.NET FormAuthentication cookie
- How to add default text in output to filled fields in Contact Form 7
- How does it work using ASP.NET FormAuthentication
- asp JQuery Setting Runtime Variables - undefined
- vb.net shared variable make problem one member can see other member information
- Getting certificate exception in asp.net webforms while sending email by using sendgrid
- Debugging Issues in ASP.NET 4.7.2 Web Forms Deployment on IIS Server After Code Modification
- Global or accesing global variable datetime string dynamically in web form application using Visual Studio 2022
- Web Forms aspx - PostAsync Web API
- How to execute client-side code after ajax FileUpload event on ASP.NET?
- Find Asp.net Web Forms control in script in Js (JavaScript) file
- How to call a method directly that resides in another .aspx.cs or .ascx.cs page within an ASP.NET Web Forms project?
- Exception System.Web.HttpCompileException (0x80004005) error CS0234: The type or namespace name 'Services' does not exist in the namespace 'Cnbp.Cbk'
- Getting parse error in aspx page while trying to load dynamic name to asp:panel ID section
Related Questions in NINJECT
- Ambiguous Call When Upgrading to Ninject.Web.WebApi.OwinSelfHost
- How to pass Dispatcher to a class through constructor by Ninject
- WPF with Dependency Injection using Ioc
- C# Ninject IIS express - continually loading/unloading
- Ninject + Ninject Child Kernels + Continuous Azure WebJobs
- What is the equivalent code for the ASP.NET Core DI framework from this example using Ninject and .toconstant?
- ninject and gzip response conflict
- How to reuse a new view in MVVM with Caliburn.Micro and Ninject
- Parameterless constructor missing - NInject Dependency Injection
- Ninject Not Resolving Web API Dependency Injection
- Refactor C# Class with Generics from IUnityContainer to Ninject
- MVC - Website crashes when browsing after sitting idle for 20 minutes, gives "The system cannot find the file specified error."
- Ninject InThreadScope() resolves a new class instance despite running on the same thread
- Inject right object depending on method parameters at ninject factory namebinding
- How to use Serilog with Windows Client (net6.0-windows) application
Related Questions in PRESENTER
- MVP createing of child view
- relationship between View and Presenter in MVP
- how to update ui in presenter android tv
- Is there a way to have more than one data type MVP - cardview & presenter
- How to pass a SwiftUI View into a class as a property? (AlertPresenter)
- Android MVP variable getter inside Presenter
- Add a list of presenters to the teams meeting
- Best way to define the presenter and outport in clear architecture?
- clean architecture : can the preseter talk to to the controller?
- How to observe activity presenter variables from fragment presenter?
- UnitTest does't work properly for MVP pattern Swift
- Datagridview and MVP layer in C# winform
- Javascript, Ajax, latte and Presenter problem. Can't use GET request on file in another directory
- Android MVP presenter unit test with Mockito causes "Wanted but not invoked" error
- How to create template protocol for presenter UITableViewCell delegate IN VIPER
Related Questions in NINJECT.WEB
- Ninject with Owin: InRequestScope doesn't work
- Asp.Net Webforms constructor injection with Ninject
- ASP.NET Webform how to use Ninject.Web.Common.WebHost Prop Injection
- Cannot upgrade Ninject to latest version in Nuget
- Ninject xml Inject from another class library
- Using Ninject with static methods
- injection error in binding in c# cyclical dependency was detected between the constructors of two services
- ToConstant while binding in Kernel
- Ninject insingletonscope creating multiple instances per request
- Ninject Alter Binding base on Owin.Context.User.Identy
- ASP.NET Web Forms + Ninject + Helper Class with iService - how to make Ninject handle iService?
- Dynamically Bind UserStore with Ninject
- Use Ninject to Property inject a dependency into Application_Start method of Global.asax
- Using ninject with Ninject.Web.Api for Web Api 2 is not working in ASP.NET MVC 5
- Is it ok to pass Ninject Web.Common UseNinjectMiddleware a lambda which returns a kernel instance?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
For webforms this is not possible because the form is not created by ninject. You have to pass it manually to the presenter.
I think the solution is to use MVC there you have support for your problem form the framework. Webforms and MVC can be mixed. You can create new pages with MVC and still use the old webform ones. Whenyou have to change a webforms page then you better refactor it to MVC befor the change.