I have downloaded a chat example from the Microsoft website. I have been following several tutorials but I have never seen the @section script{} before I have done scripts with
A section allows you to add something in a view which will be added in the layout. ie:-
view
@section scripts {
}
layout
@RenderSection("scripts", false)
now this named section scripts will be rendered where you have specified in the layout.
@RenderSection also has 2 signatures:-
public HelperResult RenderSection(string name) // section required in the view
public HelperResult RenderSection(string name, bool required)