Раздел рендеринга ASP.NET MVC Mayout
<html>
<body>
@RenderBody()
@RenderSection("scripts", required: false)
</body>
</html>
@section scripts {
<script type="text/javascript">alert('hello');</script>
}
Repulsive Rabbit