I need to have scripts at the top and bottom of my page. Telerik uses the ScriptRegistrar and for the javascript this only works if placed at the bottom of the file (just before the </body>)
I also want to use the Telerik built-in minifier/compressor.
So, say in the head of my page I need jQuery and an arbitrary javascript file, and at the bottom do the Telerik references, how would I use the ScriptRegistrar to do this?
So far I have this but it results in duplicate output, and both script tags are at the end of the page:
Head:
@(Html.Telerik().ScriptRegistrar().Scripts(scripts => scripts.AddGroup("Common", group => group
.Add("...")
.Add("...")
.Add("...")
.Combined(true).Compress(true)
)).DefaultGroup(group => group.Combined(true).Compress(true))
)
Before </body>:
@(Html.Telerik().ScriptRegistrar().jQuery(false).jQueryValidation(false)
.DefaultGroup(group => group.Combined(true).Compress(true))
)
Any ideas?
TIA