Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Unassigned: MVC3 POST Model Reflection [1510]

$
0
0
I think we have a dup of this in here but can't find it right now so porting it so we don't lose the bug.
https://aspnet.codeplex.com/workitem/10127

the model properties then the model is not created.

For example, If the model is:

public class AddressSearchModel
{
[Display(Name = "Name")]
public string BusinessName { get; set; }

[Display(Name = "Address")]
public string Address { get; set; }
}

and the controller method has the signature:

public JsonResult Find(AddressSearchModel address)

then "address" will always be null. However if I use something else as the parameter name:

public JsonResult Find(AddressSearchModel model)

then "model" will contain the object data. It appears there is a bug where the parameter name cannot match the name of the object property (most likely a reflection issue).
Comments: See http://aspnetwebstack.codeplex.com/workitem/904.

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>