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).
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.
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.
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
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
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.
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 :)
is working on a reply...