1

Closed

Rendering Section Part in Display or Editor Templates

description

I want to keep all of my JavaScript at the end of html file, before body close tag. Before the RC version, I used Assets. At this moment, I am using sections to handle this. Unfortunately, I understand this solution has a especial case which if you want to use in Display or Editor Templates - View\Shared , it is not working at all. I find the solution at this link: [http://stackoverflow.com/questions/5433531/using-sections-in-editor-display-templates].

Would you please fix this issue.

Thanks in advance for all of your great efforts and supports.
Closed Jun 27, 2012 at 6:23 PM by ErikPorter
You should look into the Optimization NuGet package.

http://nuget.org/packages/Microsoft.AspNet.Web.Optimization

Assets has been removed in favor of this library.

comments

SMHMayboudi wrote Jun 24, 2012 at 3:52 AM

Also, when I use Ajax request to a partial view which it uses this shared components, still the problem is exists!?

SMHMayboudi wrote Jun 30, 2012 at 5:40 AM

Sorry, the Scripts and Styles command are not rendered in View\Shared\DisplayTemplates and View\Shared\EditorTemplates. The best solution still is introduced at [http://stackoverflow.com/questions/5433531/using-sections-in-editor-display-templates]