Copied to clipboard

Flag this post as spam?

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


  • Garry Bain 149 posts 124 karma points
    Apr 18, 2017 @ 10:38
    Garry Bain
    0

    Html GRID custom view (based on Bootstrap3)

    Hello all, not been on here since 2013 as I changed jobs, but back to the world of Umbraco as of last week when I put it forward as the CMS my workplace should be using for their sites!

    Anyway, I'm currently working with the Grid system for the first time and wanted to use a custom view, I have copied the contents of Bootstrap3-fluid.cshtml and renamed it to MyBrand.cshtml - this works fine but the razor inside decides to throw an error, and I can't work out why.

    <div @RenderElementAttributes(row)>
    

    When I call the view, I get the error

    Compiler Error Message: CS0103: The name 'renderelementattributes' does not exist in the current context
    

    Can someone point me in the right direction for this, as I have simply copied over the code from a view that's working fine but it doesn't want to work under a different file?

    Any help would be great to put a non developer out of his misery!

    Thanks, Garry.

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Apr 18, 2017 @ 11:19
    Michael Latouche
    1

    Hi Garry,

    This is strange indeed.

    Could it be that, somehow, the library/assembly/inline methods where the method "RenderElementAttributes" is defined, is not included in your file, while included or in scope of the original file you copied it from?

    Maybe there is a "using" missing, or something similar?

    Cheers,

    Michael.

  • Garry Bain 149 posts 124 karma points
    Apr 18, 2017 @ 12:54
    Garry Bain
    0

    Thanks Michael, it seemed to correct itself when I opened and closed the solution in Visual Studio, so not sure exactly what it was?

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Apr 18, 2017 @ 12:57
    Michael Latouche
    100

    Hi Garry,

    Another software mystery I guess ?!?!

    Well, as long as it keeps working ;-)

    Cheers,

    Michaƫl.

  • 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