This question is locked. New answers and comments are not allowed.
I have an issue with scripts order rendered by ScriptRegistrar. How is it supposed to register base scripts (like
jQuery) in the layout page and based on them scripts (like
jQuery.validation) in a view?
_Layout.chtml:
@(Html.Telerik().ScriptRegistrar().jQuery(false).jQueryValidation(false)
.DefaultGroup(group =>
group.Add("jquery-1.6.3.min.js")
.Add("jquery-ui-1.8.16.min.js")
.Add("modernizr-1.7.min.js")
.Add("jquery.query-2.1.7.js")))
Index.chtml:
@{
Html.Telerik().ScriptRegistrar().DefaultGroup(group =>
group.Add("jquery.validate.min.js")
.Add("jquery.validate.unobtrusive.js"));
}
I got validation library loaded first, and only then jQuery one. In this case scripts don't work properly of course.
_Layout.chtml:
@(Html.Telerik().ScriptRegistrar().jQuery(false).jQueryValidation(false)
.DefaultGroup(group =>
group.Add("jquery-1.6.3.min.js")
.Add("jquery-ui-1.8.16.min.js")
.Add("modernizr-1.7.min.js")
.Add("jquery.query-2.1.7.js")))
Index.chtml:
@{
Html.Telerik().ScriptRegistrar().DefaultGroup(group =>
group.Add("jquery.validate.min.js")
.Add("jquery.validate.unobtrusive.js"));
}
I got validation library loaded first, and only then jQuery one. In this case scripts don't work properly of course.