Copied to clipboard

Flag this post as spam?

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


  • David 28 posts 156 karma points
    Mar 30, 2017 @ 12:06
    David
    0

    Render Partial in UmbracoViewPage

    Hello guys,

    I'm using Umbraco version 7.5.3.

    Is there a possibility to render a PartialView within a UmbracoViewPage?

    I'm building a grid editor where the user can choose between several templates. My render.cshtml starts with:

    @inherits Umbraco.Web.Mvc.UmbracoViewPage<dynamic>
    @using ClientDependency.Core.Mvc
    

    I've got 4 different templates, so basically I just thought I do a simple 'Switch-case' and I use the following code :

    @Html.partial("Templatename");
    

    Unfortunately that doesnt work and returns me an error. Has someone an idea how to solve this problem or maybe a workaround?

    MFG David

  • David 28 posts 156 karma points
    Mar 30, 2017 @ 12:51
    David
    100

    I solved it.

    Sorry for this post.

    I've added this using:

    @using System.Web.Mvc.Html
    

    Sorry again

Please Sign in or register to post replies

Write your reply to:

Draft