MVC Wrappers cause double AJAX postback in debug mode using Ajax.Beginform()

3 posts, 0 answers
  1. Andrew
    Andrew avatar
    20 posts
    Member since:
    Jun 2012

    Posted 17 Oct 2012 Link to this post

    For anybody who finds this problem, the fix is to add the following line to the bundleconfig.cs file:

    bundles.IgnoreList.Ignore("*.unobtrusive-ajax.min.js", OptimizationMode.WhenDisabled);


    This will prevent the unobtrusive ajax script from loading twice (i.e. the minified and non-minified) in debug mode, which is what causes the double postback.

    Alternatively, just remove the non minified script from the project (this obviously has implications for debugging, if you're inclined to debug the scripts included in the project template).

    Telerik - this ought to be included in your how-to guide.
  2. Brian
    Brian avatar
    1 posts
    Member since:
    Jul 2014

    Posted 21 Oct 2014 in reply to Andrew Link to this post

    Holy cow, been beating my head up against a wall for a couple hours over this.  Finally found this post.  Thanks!!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 23 Oct 2014 Link to this post

    Hello guys,

    Thank you for the feedback. I notified our documentation writers and this info will be added to the MVC troubleshooting help topic with the next help update.

    Best regards,
    Sebastian
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top