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 12133 karma points MVP 8x 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 4908 posts 12265 karma points MVP 4x 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

Please Sign in or register to post replies

Write your reply to:

Draft