I am getting the error below but I have it defined on the Layout page below. I changed the @(IsSectionDefined
to @if(IsSectionDefined
because I need to write null
in the else
statement. Why would this be an issue?
The following sections have been defined but have not been rendered for the layout page "~/Areas/Directors/Views/Shared/_MembersFormLayout.cshtml": "FormCallback".
Layout.cshtml
<form data-bind="form:{ id: @Model.FormId, callback: @if (IsSectionDefined("FormCallback")){RenderSection("FormCallback", false);}else {@(Html.Raw("null"))}}">
Page.cshtml
@section FormCallback{members.event.updateImage}