9
shouts

Update Form Fields with JSON result in ASP.NET MVC - Marc Dormey

published 325 days, 14 hours, 56 minutes ago posted by NickolayNickolay 330 days, 16 hours, 25 minutes ago
Monday, October 12, 2009 11:42:19 AM GMT Wednesday, October 07, 2009 10:12:54 AM GMT

Wouldn’t it be nifty to receive a JSON result object from AJAX and it automagically updates your form fields? Those who said “No” leave now! I had to find a way to iterate through my JSON properties and, if I named the fields the same as the JSON properties, update them all in one go..

category: ASP.NET | clicked: 94 | | source: www.marcdormey.com | show counter code
tags: Ajax, ASP.NET MVC, ASP.NET MVC 2, jQuery, JSON