This is my _Layout.cshtml
<html>
<head>
@RenderSection("Script", false)
</head>
...
</html>
This is a simple edit page edit.cshtml
@model Shop.Models.Product
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@Html.EditorForModel()
and this is ~/Views/Shared/EditorTemplates/Product.cshtml
@model Shop.Models.Product
@section Script {
<script>alert("hello");</script>
}
...
@section Script{...}
does not work in Product.cshtml because of EditorForModel. How can do it?