As of version 1.0, T4JS does not infer property names from complex types.  When you're making use of complex types as parameters (as in posting values that are bound to a View Model), you must explicitly specify the appropriate AJAX parameter names.

Here's a sample view model that is not inferred by T4JS.

public class LoginViewModel
    public string Name{ get; set; }
    public string Email{ get; set; }


The action method that uses this object must have the correct parameter names specified for the MVC binding pipeline to work properly.

[AjaxEndpoint("name", "email")]
public ActionResult Login(LoginViewModel model)

Last edited Apr 22, 2011 at 8:34 PM by tylerbrinks, version 2


No comments yet.