views:

23

answers:

1

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 ?

+1  A: 

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

Daniel Elliott
that was my theory based on observation but i was looking for some confirmation.
ooo