jQuery Breaks ASP.NET MVC Action Parameters
After upgrading to jQuery 1.4 my jQuery posts that passed in parameters to my MVC actions started failing. I noticed that “[]” was being appended to the parameters.
Instead of this:
param1=123
It looked like this:
param1[]=123
Turns out it had to do with how 1.4 serialized parameters. You can read more about it at the posts below. To fix it, I added this globally on the page for now:
// Enables for all serialization
.jQuery.ajaxSettings.traditional = true;
http://forum.jquery.com/topic/jquery-1-4-breaks-asp-net-mvc-parameter-posting
jQuery 1.4 breaks ASP.Net MVC actions with array parameters
Post Tags: jquery
Browse Timeline
- « Change Web Root Path for XAMPP on Windows
- » Firefox Private Browsing Causes ‘Script Panel was inactive during page load’ Message in Firebug