Use MVC Widgets in your Sitefinity WebForms Templates

May 16, 2014
First off thanks to Ivan for pointing me in the right direction

It's actually really simple...there's a webforms control that's like a placeholder, tell it the controller you want to render and boom, she's there.

Here's an example

<%@ Register Namespace="Telerik.Sitefinity.Mvc.Proxy" Assembly="Telerik.Sitefinity" TagPrefix="sf" %>
 <sf:MvcControllerProxy runat="server" ControllerName="SitefinityWebApp.Mvc.Controllers.MainMenu.MainMenuController" ContentTypeName="SitefinityWebApp.Mvc.Controllers.MainMenu.MainMenuController" />

If you need to add properties

<sf:MvcControllerProxy ID="MvcControllerProxy1" runat="server" ControllerName="SitefinityWebApp.Mvc.Controllers.MyWidget1Controller"
                  SerializedSettings='{ Message: "This is a test" }'>


Other Resources


Image Description

Steve McNiven-Scott

Best\Only Blogger on this site. Therefore defacto blogger of the year Award Winner.