Copied to clipboard

Flag this post as spam?

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


  • Amigo 243 posts 568 karma points
    May 12, 2015 @ 06:02
    Amigo
    0

    Render partial view inside MacroEngines razor file

    Is there some way to render a partial view inside a MacroEngines scripting razor file?

  • Alex Skrypnyk 6150 posts 24110 karma points MVP 8x admin c-trib
    May 12, 2015 @ 13:09
    Alex Skrypnyk
    0

    Hi Amigo,

    Did you try like that :

    @Html.Partial("nameOfPartial", Model)
    
    @Html.Partial("nameOfPartial")
    

    Thanks

  • Amigo 243 posts 568 karma points
    May 12, 2015 @ 20:20
    Amigo
    0

    Hi Alex,

      @Html.Partial("nameOfPartial") works fine when i try in my template.

    But i simply cant get it to work inside my cshtml macro script.

    What do i need to inheret/using to do it? 

     

  • Amigo 243 posts 568 karma points
    May 12, 2015 @ 20:29
    Amigo
    0

    tryed this too but no luck:
      @System.Web.Mvc.Html.PartialExtensions.Partial(Model, "nameOfPartial") 

  • Amigo 243 posts 568 karma points
    May 13, 2015 @ 01:33
    Amigo
    100

    Hi again,

    I have solved this by writing a Partial View Macro file instead.
    Still could not use  "@Html.Partial("nameOfPartial")" inside that one (no idea why), but i just render output direct instead.

    Thanks ;-)

Please Sign in or register to post replies

Write your reply to:

Draft