In my ASP.NET MVC3 project I have a standard _Layout.cshtml generated by Visual Studio 2010 and after closing my tag, I place a Rend
_Layout.cshtml
Rend
It is not possible to set an @section in the layout from a partial view. As a workaround you could instead call an action which renders the necessary <script> and HTML - although this is not very elegant.
@section
<script>