s

asp .net mvc exception sections have been defined but have not been rendered edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 08 September 2020 | 2699

The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_layout_yourlayout.cshtml": "Scripts".

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_LayoutWithoutSideMenu.cshtml": "Scripts".

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Solution

the solution here is to go to .cshtml view page and remove the script code shown below

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}