I am working on an asp.net MVC4 application. In my layout page, I have the following code
@RenderSection("page-specific", required: false)
and In my view which uses the above layout, I have
@section page-specific{
<script src="~/Scripts/page-specific.js" type="text/javascript"></script>
}
When I run my application, it gives me the following error
Sections cannot be empty. The "@section" keyword must be followed by a block of markup surrounded by "{}"
But all I want to do is include some page specific styles and javascript. I dont want to include any HTML markup in this particular section. How can I do this while avoiding the empty section error?