Copied to clipboard

Flag this post as spam?

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


  • Tom C 87 posts 222 karma points
    Dec 09, 2014 @ 10:40
    Tom C
    0

    @Library.Truncate throwing error

    Using an inline razor macro on a webforms template page, like this

     

       <umbraco:Macro  runat="server" language="cshtml">

    @inherits umbraco.MacroEngines.DynamicNodeContext

     

    <div> @Library.Truncate ("This is a test string",10); </div>

    ....

     

    but throws an

    Error loading MacroEngine script (file: )

    with the error

    Error Loading Razor Script (file: ) e:\HostingSpaces\...wwwroot\App_Data\TEMP\Razor\inline-54c26f37895b611286cf34db05a2b636.cshtml(34): error CS1502: The best overloaded method match for 'System.Web.WebPages.WebPageExecutingBase.Write(System.Web.WebPages.HelperResult)' has some invalid arguments    at System.Web.Compilation.AssemblyBuilder.Compile()

    Tried on 7.1.8 and 7.2.0

    would be grateful for any help!


     

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Dec 09, 2014 @ 10:45
    Dave Woestenborghs
    100

    I don't know if it's a copy paste issue. But in the example there is a space between Truncate and (. That can be the issue.

    Dave

  • Tom C 87 posts 222 karma points
    Dec 09, 2014 @ 10:48
    Tom C
    0

    crumbs, yeah it was that simple! dunno why forgot about that one but thank-you very much!

  • Dave Woestenborghs 3504 posts 12133 karma points MVP 8x admin c-trib
    Dec 09, 2014 @ 10:49
    Dave Woestenborghs
    0

    No problem..Glad to help you out.

Please Sign in or register to post replies

Write your reply to:

Draft