let say your controller action looks like this:
public ActionResult Update(Car myCar)
{
}
if you have a textbox that has
<input type='text' name='year' value='1990'>
it seems like it will bind to the myCar.year field just fine
but if you have nested objects or complex lists, etc开发者_开发技巧, it seems like you have to qualify the names of controls like:
<input type='text' name='myCar.year' value='1990'>
Even though the above is just a simple field, i thought it gets the point across.
the question is, when do you have to "qualify" the input names and when do you not ?
To quote someone who seems to know ... ;)
"if you have nested objects or complex lists, etc, it seems like you have to qualify the names of controls"
You hit the nail on the head, sir!
Kindness,
Dan
精彩评论