Copied to clipboard

Flag this post as spam?

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

  • Thamodaran 6 posts 86 karma points
    May 03, 2024 @ 07:00

    Our application currently using Umbraco 8 latest version . We are planning to upgrade it to Umbraco 10 . In current application we are using Macro to load the dynamic content from MVC partial view by following the steps :

    1. Create "Partial View Macro File" and invoke required action and controller from there

      @inherits Umbraco.Web.Macros.PartialViewMacroPage @Html.Action("AccountDashBoard", "Contract")

    2. Create "Macro File" by selecting the above created Partial View Macro .

    Macro File 3. Create content and added the Macro created above to load the partial view from application . enter image description here

    All our contents designed this way to load the view . Is there any way to achieve the same or similar in Umbraco 10 ? Kindly share your ideas to do this migration faster.

  • Huw Reddick 1811 posts 6245 karma points MVP c-trib
    May 03, 2024 @ 12:29
    Huw Reddick

    Hi Thamodaran,

    You should look into using view components to replace your @Html.Action("AccountDashBoard", "Contract") in the macro partial.

    you can't use @Html.Action in .net core

Please Sign in or register to post replies

Write your reply to: