This is a migrated thread and some comments may be shown as answers.

[Solved] Proper script registration pattern

0 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Keivan Beigi
Top achievements
Rank 1
Keivan Beigi asked on 28 Jun 2011, 05:03 PM
Hi,

I'm looking for guidelines on what is the proper pattern to register scripts in _Layout.cshtml , Views and partial views.

I have a ScriptRegistrar in at the bottom on my body element. followed by a  @RenderSection("Scripts", required: false)

I render all of my view's script tags in that section,

Is that the proper place to register internal scripts? should I do something specific to make sure they are loaded after the scripts in the layout page? 

also for partial views inject using ajax that contain telerik controls, what is the proper pattern to register the required telerik js files?


Tags
General Discussions
Asked by
Keivan Beigi
Top achievements
Rank 1
Share this question
or