7
While doing a MVC5 page with Razor, I went to put the following code
{--conteúdo da @ RenderBody() etc, etc }
Generated an error because the @ is inside keys
ERROR:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: A space or line break was encountered after the "@" character. Only valid identifiers, keywords, comments, "(" and "{" are valid at the start of a code block and they must occur immediately following "@" with no space in between.
Source Error:
Line 74: </aside>
Line 75: <!-- PAINEL PRINCIPAL -->
Line 76: {--conteúdo da @ RenderBody()
Line 77: <div id="main">
Line 78: <div id="ribbon">
Source File: /Views/Home/padroes_layout.cshtml Line: 76
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34009
How to put the arroba inside? and if I want to write @Renderbody() there is no way?
You want to return only the text written 'Renderbody()' or you want to render the page ?
– user6026
Please give some feedback... managed to resolve your doubt?
– Miguel Angelo