Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
It seems my constructor is never called, I'm I doing something wrong? I got it working in a surfacecontroller, should I just use that instead?
Code example:
ExampleController : RenderMvcController{ private readonly IExampleService exampleService; public ExampleController(IExampleService exampleService){ this.exampleService = exampleService; } public override ActionResult Index(RenderModel model){ return base.Index(createobjectmodel); } }
Thanks!
Hi Sean,
What are you trying to achieve?
If this is for route hijacking then there is some good documentation on that here https://our.umbraco.com/documentation/Reference/Routing/custom-controllers
For some general reading around the different types of controllers that can be found here https://our.umbraco.com/documentation/Implementation/Controllers/
Hope this gives you a starting point.
David
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
RenderMvcController and constructor?
It seems my constructor is never called, I'm I doing something wrong? I got it working in a surfacecontroller, should I just use that instead?
Code example:
Thanks!
Hi Sean,
What are you trying to achieve?
If this is for route hijacking then there is some good documentation on that here https://our.umbraco.com/documentation/Reference/Routing/custom-controllers
For some general reading around the different types of controllers that can be found here https://our.umbraco.com/documentation/Implementation/Controllers/
Hope this gives you a starting point.
David
is working on a reply...