Posting JSON Data to an MVC Controller via Ajax

by 

|

in

Form posts are a thing of the past. Most new interactive HTML5-Web 2.0-buzzword web apps are trending towards a one-page UI with Ajax requests used to pull and push data dynamically. So if you are doing a cool new web app that does not use any form posts, why would you make your Ajax posts…

Read more…

JSON and .NET Decimals

I recently had a problem with my controller inconsistently picking up a decimal value in my model. Here’s what the Action looked like: [HttpPost] public ActionResult SaveItem(Item myItem) {…} For simplicity we’ll say this is what Item looked like: [DataContract] public class Item { [DataMember] public long Id { get; set; } [DataMember] public decimal…

Read more…