Do you know if it's possible to make an AJAX request and have the model binder properly constitute an object based on the parameter provided?
For example:
$.ajax({
    开发者_如何学Gotype: 'POST',
    url: '../Create',
    data: ( {
        'SkillTypeRequest.Id':                0,
        'SkillTypeRequest.Event.Id':        eventId,
        'SkillTypeRequest.SkillType.Id':    skillTypeId,
        'SkillTypeRequest.Division.Id':     divisionId
    } ),
    success: function (data) { addSkillTypeRow( data ); }
});
The test controller action is:
public ActionResult Create(SkillTypeRequest request) { return Json( request ); }
At the moment, this fails in the model binder because it's trying to assign null to the SkillTypeRequest.Id. Before I investigate further, just want to make sure this is even possible to begin with or does Sharp/MVC only allow this type of binding through forms?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论