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!
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?
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.
When I call the view, I get the error
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.
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.
Thanks Michael, it seemed to correct itself when I opened and closed the solution in Visual Studio, so not sure exactly what it was?
Hi Garry,
Another software mystery I guess ?!?!
Well, as long as it keeps working ;-)
Cheers,
Michaƫl.
is working on a reply...