title: The following sections have been defined but have not been rendered for the layout page “~/Views/Shared/_Layout.cshtml”
body: <p>I've this ActionResult:</p>
  
  <pre><code>[EncryptedActionParameter]
  [CheckExternalUserRegisterSigned]
  public ActionResult ExpedienteIIT(int idExpediente)
  {
      ExpedienteContainerVM model = this.GetExpedienteVMByIdExpediente(idExpediente);
      return View("ExpedienteIIT", model);
  }
  </code></pre>
  
  <p>ExpedientIIT View:
  <a href="https://jsfiddle.net/pq16Lr4q/" rel="nofollow noreferrer">https://jsfiddle.net/pq16Lr4q/</a></p>
  
  <p>_Layout.cshtml:
  <a href="https://jsfiddle.net/1ksvav43/" rel="nofollow noreferrer">https://jsfiddle.net/1ksvav43/</a></p>
  
  <p>So when I return the view I got this error:</p>
  
  <p><a href="https://i.stack.imgur.com/TngaI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TngaI.png" alt="enter image description here"></a></p>
  
  <p>I tried to put console.logs to see if the view is rendered but is not rendered...</p>
  
  <p>Ok the error is here:</p>
  
  <pre><code>@model PortalSOCI.WEB.ViewModels.IIT.ExpedienteContainerVM
  
  
      @{
          ViewBag.Title = String.Format(PortalSOCI.WEB.Resources.ExpedienteIIT.TituloExpedienteIIT, Model.Expediente.NumeroExpediente);
      }
  
      @section JavaScript  /// &lt;-------------------- ERROR
      {
          @Html.Raw(ViewBag.message)
      @
  </code></pre>
  
  <p>Can you please help me.</p>