lundi 21 décembre 2015

How to map javascript object to mvc model?

I've a js object like bellow:

$scope.docPropIdentityModel = {
        Owner: {OwnerID:"", OwnerName: ""},

I want to send this object to my mvc controller through ajax call. Let say the controller is like:

controller(test_class model)

and the model is like:

  public string Owner{get;set;};

I'm getting null in my controller. How can I map the js object value to my model?

Aucun commentaire:

Enregistrer un commentaire