Copied to clipboard

Flag this post as spam?

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


  • Adam Jenkin 71 posts 226 karma points
    Feb 07, 2013 @ 16:00
    Adam Jenkin
    0

    Call SurfaceController and action from masterpage (webforms)

    Is it possible to call a surface controller and action from a webforms masterpage.

    Say I have a SurfaceController called MemberSurfaceController and an action named CreateMember, I would make the call like this.

    @Html.Action("CreateMember","MemberSurface")

    What would the equivilant be for doing this from a webforms masterpage?

    Thanks,

    Adam

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 07, 2013 @ 23:11
    Jan Skovgaard
    0

    Hi Adam

    I'm no expert at either webforms or MVC but I don't think it's possible to call a surface controller on a webforms page since it's a concept for MVC in Umbraco (That's at least my current understanding).

    But why would you want to mix the two?

    /Jan

  • Adam Jenkin 71 posts 226 karma points
    Feb 08, 2013 @ 10:14
    Adam Jenkin
    0

    Hi Jan,

    I have a pre-existing site which is built of webform masterpages and now have a requirement to implement some functionality which an MVC approach would be ideal for.

  • Charles Afford 1163 posts 1709 karma points
    Feb 10, 2013 @ 13:37
    Charles Afford
    0

    Hey,

    I dont see this working.  In order to use MVC SurfaceController you would have to specficy the rendering engine in the umbraco config to MVC and not WebForms. Thus you would not be able to use a masterpage.  Additionally as Jan points out why would you want to mix the two?.  Although in the shorter term re-writing the whole project in MVC is going to seem costly, if you were to take this approach in the medium to long term you are bound to run in to architecture problems and having to re-build in MVC anyway.

    Charlie :)

Please Sign in or register to post replies

Write your reply to:

Draft