This question is locked. New answers and comments are not allowed.
Hi,
I'm using the ScriptRegistrar in an MVC3 website using the Razor view engine. My problem is that the resulting asset is included twice in the output.
In the template I have this:
I'm using the ScriptRegistrar in an MVC3 website using the Razor view engine. My problem is that the resulting asset is included twice in the output.
In the template I have this:
@(Html.Telerik().ScriptRegistrar().jQuery(false) .Scripts(s => s.AddGroup("GeneralScriptGroup", group => group.DefaultPath("~/Scripts") .Add("jquery-1.4.3.js") .Add("jquery-ui-1.8.5.custom.min.js") .Add("jquery.ui.datepicker-sv.js") .Add("site.js") .Add("MicrosoftAjax.debug.js") .Add("MicrosoftMvcAjax.debug.js") .Add("MicrosoftMvcValidation.debug.js") .Compress(true) .Combined(true))))
And in my partial view I have this:
@(Html.Telerik().ScriptRegistrar().jQuery(false) .Scripts(s => s.AddGroup("SearchResultsSrciptGroup", group => group.DefaultPath("~/Scripts") .Add("SearchResultRendering.js") .Add("SearchResultFiltering.js") .Compress(true) .Combined(true))))
This result in whichever code block appearing first will render it's script tag twice, like this:
<head runat="server">
<title>Search Result</title>
<script type="text/javascript" src="/asset.axd?id=rgAAAB-LCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8UfT9qNHH2WrVVlMs7aolnffbf90dpk107pYtR-NPrqkr_d2dnfGe-OH93bog-lHj9p6ndMvs48e3fv0_ugj-vm9X_zRihq-5rcaanXOn1UfPdoZfbTEN3lWT-ev8mZdtq_y5Syvi-XF-Kebj37JiJvt9ps9K8rWNfv-L_n-L_l_AgAA___MB1kUrgAAAA%3d%3d"></script> <script type="text/javascript" src="/asset.axd?id=rgAAAB-LCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8UfT9qNHH2WrVVlMs7aolnffbf90dpk107pYtR-NPrqkr_d2dnfGe-OH93bog-lHj9p6ndMvs48e3fv0_ugj-vm9X_zRihq-5rcaanXOn1UfPdoZfbTEN3lWT-ev8mZdtq_y5Syvi-XF-Kebj37JiJvt9ps9K8rWNfv-L_n-L_l_AgAA___MB1kUrgAAAA%3d%3d"></script> <script type="text/javascript" src="/asset.axd?id=2AEAAB-LCAAAAAAABADsvQdgHEmWJSYvbcp7f0r1StfgdKEIgGATJNiQQBDswYjN5pLsHWlHIymrKoHKZVZlXWYWQMztnbz33nvvvffee--997o7nU4n99__P1xmZAFs9s5K2smeIYCqyB8_fnwfPyJ-8UfT9qNHH2WrVVlMs7aolnffbf90dpk107pYtR-NPrqkr_d2dnfGe-OH93bog-lHj9p6ndMvs48e3fv0_ugj-vm9X_zRihq-5rcaanXOn1UfPdoZfbSkb376F63z-np7d7w_vjf-6eajXzLib3eDb9cFNTgY3x9P101bLcaLYum13fPbjtfFeJa1-aqYvs3r7ebSa3hPGjZFm3uf7gevt8Uirxvqbs9rcj9o0pTFLP_JIr_K65d1Nd4d73hNPw2RWc2W3yVs6kVWv_VaPZBWXxTTumqq8_b4p7N341k-WV94jQ46jb64nEbbPey3-8mMcORp81p__5d8_5f8PwEAAP__NeMghtgBAAA%3d"></script></head>
Any suggestions on what might be causing this?