Copied to clipboard

Flag this post as spam?

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


  • Martin Griffiths 826 posts 1269 karma points c-trib
    Oct 20, 2016 @ 14:24
    Martin Griffiths
    0

    Macro Container (Models Builder return type IHtmlString) returns null

    I'm using 7.5.3 with a Macro Container and I keep getting null when trying to return HTML inside a Macro

    I'm using ModelsBuilder which generates a default return type of "IHtmlString". So in my partial view I call the property direct along with @Html.Raw but immediately get a null reference exception. If I debug it the model property is null. Very strange!

    If I manually change the Models Builder model to a dynamic all is good and I get the HTML as expected!

    Any ideas? Is the macro container broken?

    Martin

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies