I am new to MVC and know how to use Html.Displayfor(), but I don\'t know when to use it?
Html.Displayfor()
Any idea?
I'm extending @Darin's answer.
Html.DisplayFor(model => model.SomeCollection) will iterate over items in SomeCollection and display the items using DisplayFor() recursively.
Html.DisplayFor(model => model.SomeCollection)
SomeCollection
DisplayFor()