Articles : Page 1 of 1

  • What’s the Difference Between a Value Provider and Model Binder?

    What’s the Difference Between a Value Provider and Model Binder?

    Jun 11
    30

    ASP.NET MVC 3 introduced the ability to bind an incoming JSON request to an action method parameter, which is something I wrote about before. For example, suppose you have the following class defined (keeping it really simple here): public class ComicBook { public string Title { get; set; } public int IssueNumber { get; set; } } And you have an action method that accepts an instance of ComicBook: [HttpPost] public ActionResult Update(ComicBook comicBook) { // Do something with ComicBo...


  • ASP.NET MVC 3 Preview 1 Released

    ASP.NET MVC 3 Preview 1 Released

    Jul 10
    27

    The title says it all, so go get your copy today and check out all the new features.  You can download it here. New features include: Razor View Engine Dynamic View and ViewModel Properties Add View Dialog Box Supports Multiple View Engines Service Location and Dependency Injection Support Global Filters New JsonValueProviderFactory Class Support for [...]...


  • Sending JSON to an ASP.NET MVC Action Method Argument

    Sending JSON to an ASP.NET MVC Action Method Argument

    Apr 10
    15

    Javier “G Money” Lozano, one of the good folks involved with C4MVC, recently wrote a blog post on posting JSON (JavaScript Object Notation) encoded data to an MVC controller action. In his post, he describes an interesting approach of using a custom model binder to bind sent JSON data to an argument of an action method. Unfortunately, his sample left out the custom model binder and only demonstrates how to retrieve JSON data sent from a controller action, not how to send the JSON to the action...



  • 1