Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Mar 13, 2015 @ 14:46
    Dave Woestenborghs
    0

    Why does the defaultcontroller inherit from surfacecontroller

    Hi Jeroen, Jeavon,

    I was just going to the code for the defaultcontroller which inherits from SurfaceRenderMvcController 

    Why does inherit from SurfaceController and implement the interface IRenderMvcController instead of inheriting from RenderMvcContoller.

    Am I missing something obvious here ?

    Dave

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Mar 16, 2015 @ 09:04
    Jeroen Breuer
    0

    Hello,

    RenderMvcController could also be used, but you don't need to use that anymore. With IRenderMvcController you can use any controller you want. In this case I choose a SurfaceController because Umbraco uses those for posting. So now you can use 1 controller for route hijacking and posting back if you want. I just want all controllers to inherit from the same base controller for consistency. 

    Jeroen

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies