Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Bug in unobtrosive ajax file bundling

Not answered Bug in unobtrosive ajax file bundling

Feed from this thread
  • mahmoud avatar

    Posted on Feb 27, 2012 (permalink)

    Dear Teleriks , 

    I had bundled my scripts like this : 

    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/MicrosoftAjax.min.js")" type="text/javascript"></script>
    @(
     Html.Telerik()
        .ScriptRegistrar()
        .jQuery(false)
        .jQueryValidation(false)
        .DefaultGroup(o => o.Enabled(false))
        .Scripts(scripts =>
        {
            scripts.AddGroup("HeaderScript", group =>
            {
                group
                    .Combined(true)
                    .Compress(true)                
                    .Add("~/Scripts/jquery.validate.min.js")
                    .Add("~/Scripts/jquery.validate.unobtrusive.min.js")
                    .Add("~/Scripts/jquery.unobtrusive-ajax.min.js")
                    .Add("~/Scripts/MicrosoftMvcAjax.js")
                    .Add("~/Scripts/MicrosoftMvcValidation.js");
            });
        }))
    

    But I had a strange problem : multiple same ajax call in one click! (I mentioned the details here : http://stackoverflow.com/questions/8486254/4-time-same-ajax-request-by-one-ajax-call-why )
    After long time of searching for the source of problem , accidentally I found the problem solved after pull out the
    jquery.unobtrusive-ajax.min.js from telerik bundling component like this:
    
    
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/MicrosoftAjax.min.js")" type="text/javascript"></script>
    
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    

    @(
     Html.Telerik()     .ScriptRegistrar()     .jQuery(false)     .jQueryValidation(false)     .DefaultGroup(o => o.Enabled(false))     .Scripts(scripts =>     {         scripts.AddGroup("HeaderScript", group =>         {             group                 .Combined(true)                 .Compress(true)                                 .Add("~/Scripts/jquery.validate.min.js")                 .Add("~/Scripts/jquery.validate.unobtrusive.min.js")                 .Add("~/Scripts/MicrosoftMvcAjax.js")                 .Add("~/Scripts/MicrosoftMvcValidation.js");         });     }))
      

    And after that everthing worked fine!

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Bug in unobtrosive ajax file bundling