Reputation: 769
Why in a ASP.NET MVC Razor Layout Page
@if (true)
{
<div>@RenderBody()</div>
}
works, However the code below does not?
@if (true)
{
RenderBody();
}
If will execute the codes that RenderBody() suppose to render, but output nothing in the final result.
Upvotes: 0
Views: 2303